/

CVE-2026-62251

Severity:

HIGH RISK

(8.1)

SQL Injection (CWE-89) in Homer Statistics Query Handler

CVE-2026-62251

Awaiting Analysis

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution and Data Access

Severity:

HIGH RISK

(8.1)

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

Homer contains a SQL injection vulnerability in the V4StatisticsQuery handler because it forwards the user-supplied rawquery value directly to DuckDB without applying the validation used elsewhere in the application.

An authenticated user may be able to execute arbitrary SQL statements against data accessible through the FlightSQL service when the vulnerable handler is exposed.

Homer contains a SQL injection vulnerability in the V4StatisticsQuery handler because it forwards the user-supplied rawquery value directly to DuckDB without applying the validation used elsewhere in the application.

An authenticated user may be able to execute arbitrary SQL statements against data accessible through the FlightSQL service when the vulnerable handler is exposed.

Affected context

The vulnerability occurs in Homer deployments using the affected V4StatisticsQuery handler and DuckDB-backed FlightSQL service. It requires that an authenticated user can reach the statistics query endpoint and submit a value for the rawquery field without effective SQL validation or equivalent query restrictions.

The vulnerability occurs in Homer deployments using the affected V4StatisticsQuery handler and DuckDB-backed FlightSQL service. It requires that an authenticated user can reach the statistics query endpoint and submit a value for the rawquery field without effective SQL validation or equivalent query restrictions.

Exploit preconditions

  • Attack surface: The Homer statistics query API and its FlightSQL-backed data service
  • Required access: Authentication sufficient to invoke the affected handler
  • Trigger point: Processing of the user-controlled rawquery field
  • Why exploitation is possible: The handler passes raw SQL to DuckDB without invoking the validation control applied in other query paths
  • Attack surface: The Homer statistics query API and its FlightSQL-backed data service
  • Required access: Authentication sufficient to invoke the affected handler
  • Trigger point: Processing of the user-controlled rawquery field
  • Why exploitation is possible: The handler passes raw SQL to DuckDB without invoking the validation control applied in other query paths

Why this happens

The underlying bug is a failure to treat user-controlled query text as untrusted input. The V4StatisticsQuery handler sends the rawquery value directly to the database engine instead of enforcing a safe query model or consistently applying SQL validation.

This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection. The insecure pattern permits input to alter the intended database command structure rather than limiting the request to approved operations and parameters.

The underlying bug is a failure to treat user-controlled query text as untrusted input. The V4StatisticsQuery handler sends the rawquery value directly to the database engine instead of enforcing a safe query model or consistently applying SQL validation.

This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection. The insecure pattern permits input to alter the intended database command structure rather than limiting the request to approved operations and parameters.

Potential impact

  • An authenticated user may execute unauthorized SQL statements
  • Sensitive data accessible through the FlightSQL service could be disclosed
  • Database records may be altered or deleted
  • Queries could consume excessive resources and affect service availability
  • The impact may extend to other data sources or permissions available to the DuckDB process
  • An authenticated user may execute unauthorized SQL statements
  • Sensitive data accessible through the FlightSQL service could be disclosed
  • Database records may be altered or deleted
  • Queries could consume excessive resources and affect service availability
  • The impact may extend to other data sources or permissions available to the DuckDB process

General mitigation guidance

Mitigation generally focuses on removing raw SQL execution from user-controlled request paths and reducing database privileges.

Common defensive patterns include:

  • Replacing free-form SQL with parameterized queries and predefined query operations
  • Applying consistent allowlisting and validation at every query entry point
  • Separating query construction from user-provided values
  • Restricting database credentials and service capabilities to the minimum required
  • Limiting accessible schemas, tables, columns, and statement types
  • Enforcing query timeouts, resource limits, and read-only access where appropriate
  • Treating authentication as an access control layer rather than a substitute for query authorization

Mitigation generally focuses on removing raw SQL execution from user-controlled request paths and reducing database privileges.

Common defensive patterns include:

  • Replacing free-form SQL with parameterized queries and predefined query operations
  • Applying consistent allowlisting and validation at every query entry point
  • Separating query construction from user-provided values
  • Restricting database credentials and service capabilities to the minimum required
  • Limiting accessible schemas, tables, columns, and statement types
  • Enforcing query timeouts, resource limits, and read-only access where appropriate
  • Treating authentication as an access control layer rather than a substitute for query authorization

How teams detect issues like this

Organizations can look for SQL injection risks through:

  • Static analysis rules identifying request fields concatenated into SQL or passed to raw execution APIs
  • Code review checks for database calls that accept unvalidated query text
  • Tests that verify disallowed statement types and query structures are rejected
  • Runtime monitoring for unexpected DDL, DML, schema enumeration, or high-volume queries
  • Database audit policies correlating SQL activity with API identities and endpoints
  • CI policy checks requiring parameterized queries or approved query-builder interfaces

Automated security review tools may help identify direct data flow from HTTP or API inputs into database execution functions.

Organizations can look for SQL injection risks through:

  • Static analysis rules identifying request fields concatenated into SQL or passed to raw execution APIs
  • Code review checks for database calls that accept unvalidated query text
  • Tests that verify disallowed statement types and query structures are rejected
  • Runtime monitoring for unexpected DDL, DML, schema enumeration, or high-volume queries
  • Database audit policies correlating SQL activity with API identities and endpoints
  • CI policy checks requiring parameterized queries or approved query-builder interfaces

Automated security review tools may help identify direct data flow from HTTP or API inputs into database execution functions.

Sources

SourceLink
github.comgithub.com/sipcapture/homer/commit/a7d027dc684b210b62285c49f555ac88d64f35f0
github.comgithub.com/sipcapture/homer/pull/837
github.comgithub.com/sipcapture/homer/releases/tag/11.0.283
github.comgithub.com/sipcapture/homer/security/advisories/GHSA-f46q-3v67-fmm4

Frequently asked

questions

It can be exploitable through the Homer API when the affected statistics handler is network-accessible and the attacker can authenticate successfully.

The attacker generally needs valid credentials or an authenticated session with permission to invoke the vulnerable query endpoint. The precise scope depends on Homer's deployment and authorization configuration.

Avoid accepting arbitrary SQL from clients. Use predefined, parameterized queries with strict allowlists, and ensure every query path applies equivalent validation and authorization controls.

Enforce parameterized database access in coding standards and CI checks, review data flows from API inputs to SQL execution, apply least-privilege database permissions, and monitor database activity for anomalous statements.

It can be exploitable through the Homer API when the affected statistics handler is network-accessible and the attacker can authenticate successfully.

The attacker generally needs valid credentials or an authenticated session with permission to invoke the vulnerable query endpoint. The precise scope depends on Homer's deployment and authorization configuration.

Avoid accepting arbitrary SQL from clients. Use predefined, parameterized queries with strict allowlists, and ensure every query path applies equivalent validation and authorization controls.

Enforce parameterized database access in coding standards and CI checks, review data flows from API inputs to SQL execution, apply least-privilege database permissions, and monitor database activity for anomalous statements.

Find out what's already
exploitable in your codebase.