{"schema":"threatline.record/2","record":{"id":"CVE-2026-62251","aliases":["GHSA-f46q-3v67-fmm4","GO-2026-6672"],"summary":"Homer: Authenticated SQL Injection via Unvalidated rawquery Field in /api/v4/statistics/query","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** — `V4StatisticsQuery`:\n```go\nquery := &model.V4StatisticsQuery{}\nif err = c.Bind(query); err != nil { ... }\n// No ValidateRawSQL call here — 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** — 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://<homer-host>/api/v4/statistics/query \\\n  -H \"Authorization: Bearer <jwt>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"param\": {\n      \"query\": [{\"rawquery\": \"SELECT * FROM information_schema.tables\"}]\n    }\n  }'\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 — 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.","categories":["Libraries & packages"],"product":"github.com/sipcapture/homer-app","vendor":"sipcapture","ecosystem":"go","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f46q-3v67-fmm4","source_modified_at":"2026-10-07T16:13:09Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"go","name":"github.com/sipcapture/homer-app"},"range":"< 0.0.0-20260625085520-a7d027dc684b"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-62251","source_modified_at":"2026-10-07T22:05:52.827Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"homer","vendor":"sipcapture","versions":[{"version":"< 11.0.283","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f46q-3v67-fmm4","source_modified_at":"2026-10-20T00:56:06.107700572Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"Go","name":"github.com/sipcapture/homer-app","purl":"pkg:golang/github.com/sipcapture/homer-app"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"0.0.0-20260625085520-a7d027dc684b"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f46q-3v67-fmm4","source_modified_at":"2026-10-07T16:13:09Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"go","name":"github.com/sipcapture/homer-app"},"version":"0.0.0-20260625085520-a7d027dc684b"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f46q-3v67-fmm4","source_modified_at":"2026-10-20T00:56:06.107700572Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"Go","name":"github.com/sipcapture/homer-app","purl":"pkg:golang/github.com/sipcapture/homer-app"},"version":"0.0.0-20260625085520-a7d027dc684b"}],"cvss":8.1,"severity":"High","kev":{"listed":false},"epss":{"probability":0.00341,"percentile":0.2642,"score_date":"2026-10-23"},"published_at":"2026-10-07T16:09:41.434Z","modified_at":"2026-10-20T00:56:06.107700572Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-f46q-3v67-fmm4","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-07T16:13:09Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-62251","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-07T22:05:52.827Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-f46q-3v67-fmm4","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-20T00:56:06.107700572Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-62251","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/sipcapture/homer/security/advisories/GHSA-f46q-3v67-fmm4","tags":["x_refsource_CONFIRM"]},{"source":"CVE List","url":"https://github.com/sipcapture/homer/pull/837","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/sipcapture/homer/commit/a7d027dc684b210b62285c49f555ac88d64f35f0","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/sipcapture/homer/releases/tag/11.0.283","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-f46q-3v67-fmm4","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"total","assessed_at":"2026-10-07T21:59:27.093310Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-20T00:56:06.107700572Z","content_hash":"fc7780caf377a5f98572a1bc178bdf8c1c22be51e2e5f6ae93d1c1e8c4c0f033"}}
