6.9medium
alerta-server has potential SQL Injection vulnerability in Query String Syntax (q=) API
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 2.01% (higher than 81% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8prr-286p-4w7jPYSEC-2026-2341
Description
Alerta is a monitoring tool. Prior to version 9.1.0, the 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. This issue has been patched in version 9.1.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| alerta alerta | < 9.1.0 | CVE List |
| alerta-server (PyPI) | before 9.1.0 | GitHub Advisory Database, PyPA Advisory Database |
| alerta_project alerta | before 9.1.0 | NVD |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
| CISA-ADP | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
Alerta is a monitoring tool. Prior to version 9.1.0, the 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. This issue has been patched in version 9.1.0.
GitHub Advisory Database
Impact
The 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.
Patches
Fixed 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.
Workarounds
Upgrade to v9.1.0 or later. If unable to upgrade, deploy a proxy in front of the Alerta API to sanitize the q= parameter.
Resources
https://github.com/alerta/alerta/pull/712/files https://owasp.org/www-community/attacks/SQL_Injection
NVD (es)
Alerta es una herramienta de monitoreo. Antes de la versión 9.1.0, la API de búsqueda de cadena de consulta (q=) era vulnerable a la inyección SQL a través del analizador de consultas de Postgres, que construía cláusulas WHERE interpolando términos de búsqueda proporcionados por el usuario directamente en cadenas SQL a través de f-strings. Este problema ha sido parcheado en la versión 9.1.0.
References
| https://github.com/alerta/alerta/security/advisories/GHSA-8prr-286p-4w7j | vendor-advisory, web | |
| https://github.com/alerta/alerta/pull/2040 | issue-tracking, patch, web | |
| https://github.com/alerta/alerta/pull/712 | issue-tracking, patch, web | |
| https://github.com/alerta/alerta/commit/aeba85a37a09e5769a7a2da56481aa979ff99a00 | patch, web | |
| https://github.com/alerta/alerta/commit/fdd52cd1abad8d02d1dfb8ecdcdbb43b6af3b883 | patch, web | |
| https://github.com/alerta/alerta/releases/tag/v9.1.0 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-34400 | advisory | |
| https://github.com/alerta/alerta | package | |
| https://pypi.org/project/alerta-server | package | |
| https://github.com/advisories/GHSA-8prr-286p-4w7j | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34400 changed 2026-04-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8prr-286p-4w7j changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-34400 changed 2026-07-24 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2341 changed 2026-07-13 | CC-BY-4.0 |