Executive brief
Alerta, a monitoring tool used to consolidate and visualize alerts from multiple systems, is vulnerable to a critical security flaw in its search functionality. An attacker can use specially crafted search queries to interfere with the underlying database, potentially leading to the theft of sensitive monitoring data or unauthorized modification of records. This issue affects all versions prior to 9.1.0 and can be exploited remotely without any user interaction.
Technical details
A SQL injection vulnerability exists in Alerta's Postgres query parser. The root cause is the use of Python f-strings to interpolate user-supplied search terms directly into SQL WHERE clauses, rather than using parameterized queries. An attacker can exploit this by sending a crafted string to the `q=` query parameter in the search API. This allows for full database compromise, including data exfiltration and modification. The vulnerability was addressed in version 9.1.0 by implementing a query tree that produces SQL with placeholders and a corresponding parameters dictionary for safe execution.
Affected products
- Alerta Alerta < 9.1.0
Timeline
- 2026-03-27: patched: Fix committed to repository
- 2026-03-31: disclosed: CVE-2026-34400 published
References
- https://github.com/alerta/alerta/commit/aeba85a37a09e5769a7a2da56481aa979ff99a00
- https://github.com/alerta/alerta/commit/fdd52cd1abad8d02d1dfb8ecdcdbb43b6af3b883
- https://github.com/alerta/alerta/pull/2040
- https://github.com/alerta/alerta/pull/712
- https://github.com/alerta/alerta/releases/tag/v9.1.0
- https://github.com/alerta/alerta/security/advisories/GHSA-8prr-286p-4w7j