/

CVE-2025-61024

Severity:

HIGH RISK

(7.5)

SQL Injection (CWE-89) in Virtuoso sqlo_try_in_loop

CVE-2025-61024

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Denial of Service via SQL Injection

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection vulnerability in the sqlo_try_in_loop component of Virtuoso Open-Source 7.2.11 allows crafted SQL statements to disrupt normal database processing.

When untrusted input is incorporated into SQL without proper validation or parameterization, attackers can trigger conditions that result in Denial of Service (DoS).

Affected context

This vulnerability manifests in deployments of Virtuoso Open-Source 7.2.11 where application code passes user-controlled or otherwise untrusted data into SQL statements handled by the sqlo_try_in_loop component.

It becomes relevant when SQL queries are dynamically constructed and executed without strict input validation or safe parameter binding, enabling malformed or hostile statements to reach the database engine.

Exploit preconditions

  • Attack surface: Database-backed application endpoints that accept input used in SQL queries processed by Virtuoso.
  • Required access: Ability to send or influence SQL-related input (e.g., via web forms, APIs, or query interfaces).
  • Trigger point: Execution of crafted SQL statements within the sqlo_try_in_loop logic.
  • Why exploitation is possible: The component accepts dynamically constructed SQL where untrusted input is concatenated or otherwise embedded directly, allowing attackers to manipulate query behavior and exhaust resources.

Why this happens

The underlying issue aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection).

Sqlo_try_in_loop processes SQL that incorporates untrusted data without ensuring it is safely parameterized or sanitized, so control characters, operators, and other SQL syntax can alter the intended query.

This insecure pattern lets attackers craft statements that stress the engine, cause excessive computation, or induce error paths that ultimately lead to a Denial of Service.

Potential impact

  • Attackers may cause the database process to consume excessive CPU or memory.
  • Application services relying on Virtuoso could become unresponsive or crash.
  • Scheduled or critical queries can be delayed or starved of resources.
  • System stability and availability for legitimate users may be degraded.

General mitigation guidance

Mitigation generally focuses on treating all SQL input as untrusted and enforcing safe query construction patterns.

Effective strategies include:

  • Using prepared statements or parameterized queries instead of string concatenation.
  • Applying strict input validation and normalization for all query parameters.
  • Limiting query complexity and resource usage through guardrails and timeouts.
  • Applying least-privilege access controls so exposed interfaces cannot execute unbounded or highly complex SQL.

These patterns reduce the likelihood that crafted SQL can induce disruptive behavior in the database engine.

How teams detect issues like this

High-level detection approaches involve:

  • Static analysis to flag dynamic SQL construction and direct concatenation of user input.
  • Code review guidelines that require parameterized queries and explicit validation steps.
  • Runtime monitoring for anomalous query patterns, spikes in resource usage, or frequent errors originating from specific inputs.
  • Policy enforcement in CI/CD pipelines to prevent introduction of new unparameterized SQL paths, optionally aided by automated security testing tools.

Sources

SourceLink
github.comgithub.com/openlink/virtuoso-opensource/issues/1227

Frequently asked

questions

The described impact is primarily Denial of Service, but SQL injection as a class can often enable broader attacks. The actual scope depends on how the affected queries are used and what privileges they hold.

An attacker needs a way to influence or supply data that ends up in SQL statements processed by Virtuoso, such as web inputs, API parameters, or other data entry interfaces.

The most robust fix is to replace dynamic string-based SQL with prepared statements or parameterized queries and ensure all inputs are strictly validated before use.

Establish secure coding standards that mandate parameterized queries, enforce input validation, and integrate automated checks into development workflows so unsafe SQL construction is detected early.

Find out what's already
exploitable in your codebase.