{"id":"CVE-2026-34400","aliases":["GHSA-8prr-286p-4w7j","PYSEC-2026-2341"],"url":"https://o3.security/vulnerability/CVE-2026-34400","summary":"alerta-server has potential SQL Injection vulnerability in Query String Syntax (q=) API","details":"### Impact\nThe Query string search API (q=) was vulnerable to SQL injection via the Postgres query parser, which built WHERE clauses by interpolating user-supplied search terms directly into SQL strings via f-strings.\n\n### Patches\nFixed in v9.1.0. The Postgres query parser now uses parameterized queries with %(name)s placeholders passed to psycopg2's cursor.execute(), preventing SQL injection through the ?q= parameter. The MongoDB backend was not affected.\n\n### Workarounds\nUpgrade to v9.1.0 or later. If unable to upgrade, deploy a proxy in front of the Alerta API to sanitize the q= parameter.\n\n### Resources\nhttps://github.com/alerta/alerta/pull/712/files\nhttps://owasp.org/www-community/attacks/SQL_Injection","published":"2026-03-31T21:00:59.824Z","modified":"2026-08-12T03:51:43.638585301Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"alerta-server","fixedVersion":"9.1.0"}],"fix":{"url":"https://github.com/alerta/alerta/commit/aeba85a37a09e5769a7a2da56481aa979ff99a00","label":"alerta/alerta@aeba85a"},"references":[{"type":"WEB","url":"https://github.com/alerta/alerta/releases/tag/v9.1.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34400.json"},{"type":"ADVISORY","url":"https://github.com/alerta/alerta/security/advisories/GHSA-8prr-286p-4w7j"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34400"},{"type":"FIX","url":"https://github.com/alerta/alerta/commit/aeba85a37a09e5769a7a2da56481aa979ff99a00"},{"type":"FIX","url":"https://github.com/alerta/alerta/commit/fdd52cd1abad8d02d1dfb8ecdcdbb43b6af3b883"},{"type":"FIX","url":"https://github.com/alerta/alerta/pull/2040"},{"type":"FIX","url":"https://github.com/alerta/alerta/pull/712"},{"type":"PACKAGE","url":"https://github.com/alerta/alerta"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:43.638585301Z"}}