CVE-2024-57659
Executive Summary
CVE-2024-57659 is a denial-of-service (DoS) vulnerability in the sqlg_parallel_ts_seq component of OpenLink Virtuoso Open-Source version 7.2.11. An attacker can trigger a crash or resource exhaustion by sending crafted SQL statements, leading to service unavailability. No patch or public exploit is currently available. The vulnerability is classified under CWE-770 (Allocation of Resources Without Limits or Throttling).
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
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (No official vector assigned)
- Attack Vector (AV): Network (likely)
- Attack Complexity (AC): Low (likely)
- Privileges Required (PR): None (likely)
- User Interaction (UI): None (likely)
- Scope (S): Unchanged
- Confidentiality (C): None
- Integrity (I): None
- Availability (A): High
- Threat Level: Medium (DoS only, no data breach)
Deep Dive & Mechanics
The sqlg_parallel_ts_seq component is part of Virtuoso’s SQL engine for parallel processing of temporal sequences. The vulnerability arises from improper input validation or resource management when handling specially crafted SQL statements. An attacker can send a query that triggers excessive memory allocation, infinite loops, or stack exhaustion, causing the database server to crash or become unresponsive.
The flaw is in the internal handling of parallel sequence operations, likely due to missing bounds checks or lack of recursion depth limits. Since no patch exists, the exact code path is speculative but consistent with typical DoS patterns in database engines.
Vulnerable vs. Patched Code
No patched version is available. The vulnerable code resides in the sqlg_parallel_ts_seq function within Virtuoso’s source. A hypothetical fix would involve adding input validation, resource limits, or recursion guards.
Vulnerable (pseudo-code):
void sqlg_parallel_ts_seq(Query *q) {
// No bounds check on input size
while (q->next) {
// Recursive or loop without termination guarantee
process_sequence(q->data);
}
}
Patched (hypothetical):
void sqlg_parallel_ts_seq(Query *q) {
int max_depth = 1000;
if (q->depth > max_depth) {
error("Too many nested sequences");
return;
}
while (q->next && q->size < MAX_ALLOC) {
process_sequence(q->data);
}
}
Exploitation & Lab Setup
Red Team
- Setup: Deploy Virtuoso 7.2.11 in a lab environment (e.g., Docker).
- Craft Payload: Send a SQL query with deeply nested or infinite
PARALLEL_TS_SEQcalls. - Trigger: Execute the query via ODBC/JDBC or HTTP endpoint.
- Observe: Monitor server crash or CPU/memory exhaustion.
Example SQL payload (conceptual):
SELECT * FROM (SELECT * FROM (SELECT * FROM ... (SELECT * FROM table WHERE PARALLEL_TS_SEQ(...)) ... ));
Blue Team
- Detection: Monitor for abnormal SQL query patterns (excessive nesting, long execution times).
- Mitigation: Implement query timeout and resource limits at the database level.
- Response: Restart the service and block offending IPs.
Indicators of Compromise (IOCs)
- Network: Repeated SQL queries with high nesting depth or large
PARALLEL_TS_SEQarguments. - System: High CPU/memory usage by the
virtuoso-tprocess. - Logs: Error messages like "out of memory" or "stack overflow" in Virtuoso logs.
- File: Core dumps or crash logs in
/var/lib/virtuoso/db/.
Detection Engineering
YARA Rule
rule CVE_2024_57659_DoS {
meta:
description = "Detects crafted SQL statements targeting Virtuoso sqlg_parallel_ts_seq"
author = "Valters IT"
date = "2025-04-10"
strings:
$sql1 = "PARALLEL_TS_SEQ" nocase
$sql2 = "sqlg_parallel_ts_seq" nocase
$pattern1 = /SELECT.*FROM.*SELECT.*FROM.*SELECT/ nocase
condition:
($sql1 or $sql2) and #pattern1 > 5
}
Sigma Rule
title: Virtuoso DoS via Crafted SQL
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL queries with excessive nesting targeting Virtuoso
logsource:
category: application
product: virtuoso
detection:
selection:
query|contains: 'PARALLEL_TS_SEQ'
condition: selection and |query| > 1000
falsepositives:
- Legitimate complex queries
level: high
Suricata Rule
alert tcp any any -> any 1111 (msg:"CVE-2024-57659 Virtuoso DoS Attempt"; flow:to_server; content:"PARALLEL_TS_SEQ"; nocase; pcre:"/(SELECT.*){10,}/"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the
sqlg_parallel_ts_seqfeature if not needed, or apply query throttling. - Short-term: Monitor for updates from OpenLink; consider using a WAF to block suspicious SQL patterns.
- Long-term: Upgrade to a patched version when available. Implement resource limits (e.g.,
max_query_depth,memory_limit).
Valters IT
DevSecOps & Cyber Threat Intelligence