☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-57658

CVE-2024-57658 Denial of Service in Openlink
📅 PUBLISHED: 2025-01-14 00:00 UTC 🔄 UPDATED: 2026-09-24 06:00 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.76%
👁️
0.76% probability
18.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-57658 is a denial-of-service (DoS) vulnerability in the sql_tree_hash_1 component of OpenLink Virtuoso Open-Source version 7.2.11. An attacker can craft malicious SQL statements that cause the database server to crash or become unresponsive, leading to service disruption. The vulnerability has a CVSS score of 0.0 (unscored) and no known public exploit code or patch. The EPSS score is 0.0%, indicating low exploitation activity in the wild. This report provides a comprehensive technical analysis, detection guidance, and mitigation strategies.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the OpenLink Virtuoso Open-Source database, which is distributed as a standalone package. It is not an NPM, PyPI, Go, or Ruby package. However, organizations using Virtuoso in their supply chain (e.g., as a data integration platform) should assess their exposure.

CVSS Breakdown & Threat Level

The CVSS score is 0.0, meaning no official vector has been assigned. Based on the nature of the vulnerability (DoS via crafted SQL), a reasonable vector would be:

  • Attack Vector (AV): Network (N) – SQL statements can be sent over the network.
  • Attack Complexity (AC): Low (L) – Crafting the SQL statement requires minimal effort.
  • Privileges Required (PR): Low (L) – An attacker needs database access (e.g., a low-privileged user).
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): None (N) – No data exposure.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): High (H) – Service disruption.

Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Estimated Score: 6.5 (Medium)

Threat Level: Medium. The vulnerability is easy to exploit but requires authenticated access to the database. No public exploit exists, but the risk increases if the database is exposed to untrusted users.

Deep Dive & Mechanics

The vulnerability resides in the sql_tree_hash_1 function within the Virtuoso SQL parser. This function is responsible for computing hash values for SQL query trees during query optimization and caching. When a specially crafted SQL statement is processed, the function enters an infinite loop or consumes excessive memory, causing the server to hang or crash.

Root Cause: Improper handling of recursive or deeply nested SQL constructs (e.g., subqueries, complex joins, or malformed expressions) leads to uncontrolled recursion or memory allocation.

Attack Vector: An authenticated user with the ability to execute arbitrary SQL statements can send a malicious query to the server. The query does not need to be valid; it only needs to trigger the vulnerable code path.

Impact: Denial of Service – the Virtuoso server becomes unresponsive, requiring a restart. This can disrupt business operations relying on the database.

Vulnerable vs. Patched Code

No patched version is available. The vulnerable code is in the sql_tree_hash_1 function in the Virtuoso source code (likely in libsrc/Wi/sqlcomp.c or similar). The function computes a hash by traversing the SQL parse tree. A fix would involve adding recursion depth limits or input validation to prevent excessive recursion.

Vulnerable Code (Conceptual):

unsigned long sql_tree_hash_1(SQL_TREE *node) {
    unsigned long hash = 0;
    if (node == NULL) return 0;
    hash += node->type;
    hash += sql_tree_hash_1(node->left);  // Recursive call
    hash += sql_tree_hash_1(node->right); // Recursive call
    return hash;
}

Patched Code (Hypothetical):

unsigned long sql_tree_hash_1(SQL_TREE *node, int depth) {
    if (depth > MAX_RECURSION_DEPTH) return 0; // Limit recursion
    unsigned long hash = 0;
    if (node == NULL) return 0;
    hash += node->type;
    hash += sql_tree_hash_1(node->left, depth + 1);
    hash += sql_tree_hash_1(node->right, depth + 1);
    return hash;
}

Exploitation & Lab Setup

Red Team

Objective: Cause a Denial of Service on a Virtuoso server.

Prerequisites:

  • Access to a Virtuoso database (e.g., via isql or ODBC/JDBC).
  • Knowledge of the database schema (optional but helpful).

Exploit Steps:

  1. Connect to the Virtuoso server using a valid account.
  2. Execute a crafted SQL statement that triggers the vulnerability. Example (conceptual):
    SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT 1) AS t1) AS t2) AS t3) AS t4;
    
    Or use deeply nested subqueries with UNION or JOIN operations.
  3. Monitor the server for unresponsiveness or crash.

Note: No public exploit code exists. The above is a conceptual example.

Blue Team

Detection:

  • Monitor for SQL queries with excessive nesting or recursion.
  • Use database audit logs to identify suspicious queries.
  • Set up resource limits (e.g., query timeout, memory limits) to mitigate impact.

Mitigation:

  • Restrict database access to trusted users only.
  • Apply network segmentation to limit exposure.
  • If possible, upgrade to a patched version when available.

Indicators of Compromise (IOCs)

  • Log Entries: Database logs showing queries with deep nesting or malformed SQL.
  • System Impact: Sudden unresponsiveness of the Virtuoso server, high CPU/memory usage.
  • Network Traffic: Repeated connections from a single source sending complex SQL statements.

File-Based IOCs:

  • Virtuoso error logs (e.g., virtuoso.log) containing stack traces related to sql_tree_hash_1.

Detection Engineering

YARA Rule

rule CVE_2024_57658_Virtuoso_DoS {
    meta:
        description = "Detects SQL queries targeting CVE-2024-57658 in Virtuoso logs"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-57658"
    strings:
        $s1 = "sql_tree_hash_1" ascii wide nocase
        $s2 = "stack overflow" ascii wide nocase
        $s3 = "recursion" ascii wide nocase
    condition:
        any of ($s1, $s2, $s3)
}

Sigma Rule

title: CVE-2024-57658 Virtuoso DoS via Crafted SQL
id: 8a3b2c1d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects SQL queries that may exploit CVE-2024-57658 in OpenLink Virtuoso
author: Valters IT
date: 2025-04-10
logsource:
    category: application
    product: virtuoso
detection:
    selection:
        EventID: 1000  # Example event ID for SQL errors
        Message|contains: 'sql_tree_hash_1'
    condition: selection
falsepositives:
    - Legitimate complex queries
level: high

Suricata Rule

alert tcp $EXTERNAL_NET any -> $HOME_NET 1111 (msg:"CVE-2024-57658 Virtuoso DoS Attempt"; flow:to_server,established; content:"SELECT"; depth:6; content:"FROM"; distance:0; within:100; pcre:"/(SELECT\s+.*\s+FROM\s+.*){10,}/i"; classtype:attempted-dos; sid:1000001; rev:1;)

Note: Adjust port (default Virtuoso is 1111) and PCRE pattern as needed.

Remediation & Mitigation

Immediate Actions:

  1. Restrict Access: Limit database access to trusted users and IP addresses.
  2. Apply Input Validation: Use a database proxy or WAF to filter overly complex SQL queries.
  3. Set Resource Limits: Configure Virtuoso to limit query execution time and memory usage (e.g., MaxQueryMemory, MaxQueryTime).

Long-Term Fix:

  • Monitor the OpenLink Virtuoso repository for a patch.
  • Consider migrating to an alternative database if no patch is released.

Workaround:

  • Disable query caching or hash-based optimization if possible (may impact performance).

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-57658/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.