GHSA-F46Q-3V67-FMM4

Vulnerability from github – Published: 2026-10-07 16:13 – Updated: 2026-10-07 16:13
VLAI
Summary
Homer: Authenticated SQL Injection via Unvalidated rawquery Field in /api/v4/statistics/query
Details

Summary

The V4StatisticsQuery handler passes the user-supplied rawquery field directly to DuckDB without calling the sqlvalidator.ValidateRawSQL function used throughout the rest of the codebase. Any authenticated user can execute arbitrary SQL statements against all data accessible through the FlightSQL service.

Details

coordinator/handlers/statistics_v4.go lines 74-107 — V4StatisticsQuery:

query := &model.V4StatisticsQuery{}
if err = c.Bind(query); err != nil { ... }
// No ValidateRawSQL call here — contrast with other handlers:
results, err := h.flightService.Query(c.Request().Context(), query.RawQuery)

Contrast with coordinator/handlers/search.go line 194 — secure pattern not followed:

if err := sqlvalidator.ValidateRawSQL(rawQuery); err != nil {
    return c.JSON(http.StatusBadRequest, ...)
}

query.RawQuery is whatever the caller submitted; it is passed verbatim to the FlightSQL/DuckDB backend. The handler is registered under the protected group (requires JWT), but given that the default JWT secret is empty (see related advisory), this is effectively pre-authentication on a default deployment.

PoC

# With a valid JWT (or empty JWT secret bypass):
curl -s -X POST http://<homer-host>/api/v4/statistics/query \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "param": {
      "query": [{"rawquery": "SELECT * FROM information_schema.tables"}]
    }
  }'
# Returns all table names accessible to the DuckDB FlightSQL service

# Exfiltrate all stored call records:
# "rawquery": "SELECT * FROM hep LIMIT 1000"
# Arbitrary DuckDB SQL is accepted including INSTALL/LOAD for extension-based exfiltration

Impact

SQL Injection / Improper Neutralization of Special Elements (CWE-89). Any authenticated user can execute arbitrary SQL against all data accessible to the FlightSQL/DuckDB backend — including all stored VoIP call records, SIP messages, and metadata. Combined with the authentication bypass when JWT secret is empty, this is exploitable without credentials.

Fix

Apply sqlvalidator.ValidateRawSQL() to query.RawQuery before passing it to h.flightService.Query(), matching the pattern already used in search.go and transactions_v4.go.

If possible, please apply for a CVE number when posting.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/sipcapture/homer-app"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.0.0-20260625085520-a7d027dc684b"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-62251"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-07T16:13:08Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\nThe `V4StatisticsQuery` handler passes the user-supplied `rawquery` field directly to DuckDB without calling the `sqlvalidator.ValidateRawSQL` function used throughout the rest of the codebase. Any authenticated user can execute arbitrary SQL statements against all data accessible through the FlightSQL service.\n\n### Details\n**`coordinator/handlers/statistics_v4.go` lines 74-107** \u2014 `V4StatisticsQuery`:\n```go\nquery := \u0026model.V4StatisticsQuery{}\nif err = c.Bind(query); err != nil { ... }\n// No ValidateRawSQL call here \u2014 contrast with other handlers:\nresults, err := h.flightService.Query(c.Request().Context(), query.RawQuery)\n```\n\n**Contrast with `coordinator/handlers/search.go` line 194** \u2014 secure pattern not followed:\n```go\nif err := sqlvalidator.ValidateRawSQL(rawQuery); err != nil {\n    return c.JSON(http.StatusBadRequest, ...)\n}\n```\n\n`query.RawQuery` is whatever the caller submitted; it is passed verbatim to the FlightSQL/DuckDB backend. The handler is registered under the `protected` group (requires JWT), but given that the default JWT secret is empty (see related advisory), this is effectively pre-authentication on a default deployment.\n\n### PoC\n```bash\n# With a valid JWT (or empty JWT secret bypass):\ncurl -s -X POST http://\u003chomer-host\u003e/api/v4/statistics/query \\\n  -H \"Authorization: Bearer \u003cjwt\u003e\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \u0027{\n    \"param\": {\n      \"query\": [{\"rawquery\": \"SELECT * FROM information_schema.tables\"}]\n    }\n  }\u0027\n# Returns all table names accessible to the DuckDB FlightSQL service\n\n# Exfiltrate all stored call records:\n# \"rawquery\": \"SELECT * FROM hep LIMIT 1000\"\n# Arbitrary DuckDB SQL is accepted including INSTALL/LOAD for extension-based exfiltration\n```\n\n### Impact\nSQL Injection / Improper Neutralization of Special Elements (CWE-89). Any authenticated user can execute arbitrary SQL against all data accessible to the FlightSQL/DuckDB backend \u2014 including all stored VoIP call records, SIP messages, and metadata. Combined with the authentication bypass when JWT secret is empty, this is exploitable without credentials.\n\n### Fix\nApply `sqlvalidator.ValidateRawSQL()` to `query.RawQuery` before passing it to `h.flightService.Query()`, matching the pattern already used in `search.go` and `transactions_v4.go`.\n\nIf possible, please apply for a CVE number when posting.",
  "id": "GHSA-f46q-3v67-fmm4",
  "modified": "2026-10-07T16:13:08Z",
  "published": "2026-10-07T16:13:08Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/sipcapture/homer/security/advisories/GHSA-f46q-3v67-fmm4"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sipcapture/homer/pull/837"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sipcapture/homer/commit/a7d027dc684b210b62285c49f555ac88d64f35f0"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/sipcapture/homer"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sipcapture/homer/releases/tag/11.0.283"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Homer: Authenticated SQL Injection via Unvalidated rawquery Field in /api/v4/statistics/query"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…