CVE-2024-57664
Executive Summary
CVE-2024-57664 is a denial-of-service (DoS) vulnerability in the sqlg_group_node component of OpenLink Virtuoso Open Source v7.2.11. An attacker can trigger a crash or resource exhaustion by sending crafted SQL statements that exploit improper handling of grouping operations. No public proof-of-concept (PoC) or patch is currently available, and the EPSS score is 0.0%, indicating low exploitation activity. However, the vulnerability is unpatched, making it a latent risk for systems running this version.
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
This vulnerability affects the open-source Virtuoso database engine, which is distributed as source code and binary packages. Organizations using Virtuoso v7.2.11 should monitor for official patches or consider upgrading to a newer version if available. No package manager (NPM, PyPI, Go, Ruby) is involved.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (No vector provided)
- Attack Vector: Network (likely)
- Attack Complexity: Low
- Privileges Required: None (if SQL injection is possible)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: None
- Availability Impact: High
- Threat Level: Medium (due to unpatched status and potential for DoS)
Deep Dive & Mechanics
The vulnerability resides in the sqlg_group_node component, which handles SQL GROUP BY operations. When a specially crafted SQL statement is executed, the component fails to validate or sanitize input properly, leading to a crash or infinite loop. This is a classic SQL injection-like issue but focused on denial of service rather than data exfiltration.
Root Cause: Improper input validation in the grouping logic, likely due to a buffer overflow, null pointer dereference, or infinite recursion when processing malformed GROUP BY clauses.
Attack Vector: An attacker with network access to the Virtuoso server (default port 8890) can send a malicious SQL query via the SPARQL endpoint or SQL interface.
Impact: Successful exploitation causes the Virtuoso process to crash or become unresponsive, resulting in denial of service for legitimate users.
Vulnerable vs. Patched Code
No patched version is available. The vulnerable code is in the sqlg_group_node function within the Virtuoso source tree. A hypothetical fix would involve adding input validation and bounds checking for GROUP BY expressions.
Vulnerable Code (v7.2.11):
// Simplified example of vulnerable logic
void sqlg_group_node(node_t *node) {
// No validation of node->expr
process_group_expr(node->expr); // Could cause crash if expr is malformed
}
Patched Code (hypothetical):
void sqlg_group_node(node_t *node) {
if (node == NULL || node->expr == NULL) {
return; // Early exit on invalid input
}
if (!validate_expr(node->expr)) {
log_error("Invalid GROUP BY expression");
return;
}
process_group_expr(node->expr);
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to a Virtuoso server (e.g.,
http://target:8890/sparql) - Ability to send SQL queries
Exploit Steps:
- Identify the Virtuoso endpoint (e.g., SPARQL or SQL).
- Send a crafted SQL statement with a malformed GROUP BY clause:
Or a deeply nested GROUP BY:SELECT * FROM <http://example.com/table> GROUP BY 1/0SELECT * FROM <http://example.com/table> GROUP BY (SELECT (SELECT ...)) - Monitor server availability. If the server crashes or becomes unresponsive, the exploit is successful.
Note: No public exploit code is available. The above is a conceptual example.
Blue Team
Detection:
- Monitor for unusual SQL queries with complex or malformed GROUP BY clauses.
- Set up alerts for repeated failed queries or server crashes.
Mitigation:
- Restrict network access to the Virtuoso server (firewall rules).
- Use a Web Application Firewall (WAF) to filter malicious SQL patterns.
- Apply rate limiting to the SPARQL/SQL endpoints.
Indicators of Compromise (IOCs)
- Network: Unusual SQL queries containing
GROUP BYwith division by zero, subqueries, or excessive nesting. - Logs: Virtuoso error logs showing crashes in
sqlg_group_nodeorSIGSEGVsignals. - System: Unexpected downtime of the Virtuoso service.
Detection Engineering
YARA Rule
rule CVE_2024_57664_Virtuoso_DoS {
meta:
description = "Detects crafted SQL statements targeting CVE-2024-57664"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-57664"
strings:
$sql1 = "GROUP BY" nocase
$sql2 = "1/0" nocase
$sql3 = "SELECT (SELECT" nocase
condition:
all of ($sql1, $sql2) or all of ($sql1, $sql3)
}
Sigma Rule
title: CVE-2024-57664 Virtuoso DoS via Crafted SQL
id: 8a3f2c1e-5d7b-4a9f-8c6e-1b2d3e4f5a6b
status: experimental
description: Detects SQL queries with malformed GROUP BY clauses targeting Virtuoso
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: virtuoso
detection:
selection:
query|contains:
- 'GROUP BY 1/0'
- 'GROUP BY (SELECT'
condition: selection
falsepositives:
- Legitimate complex queries (rare)
level: high
Suricata Rule
alert tcp any any -> any 8890 (msg:"CVE-2024-57664 Virtuoso DoS Attempt"; flow:to_server,established; content:"GROUP BY"; nocase; content:"1/0"; distance:0; within:100; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Restrict network access to the Virtuoso server using firewall rules. Only allow trusted IPs.
- Short-term: Monitor for official patches from OpenLink. If none, consider disabling the SPARQL endpoint or using a reverse proxy with input validation.
- Long-term: Upgrade to a patched version when available. If no patch is released, consider migrating to an alternative database solution.
- Compensating Controls: Implement a Web Application Firewall (WAF) to block SQL injection patterns. Use intrusion detection systems (IDS) to alert on suspicious queries.
Valters IT
Securing Digital Frontiers