Skip to content

alerta-server has potential SQL Injection vulnerability in Query String Syntax (q=) API

High severity GitHub Reviewed Published Mar 28, 2026 in alerta/alerta

Package

pip alerta-server (pip)

Affected versions

< 9.1.0

Patched versions

9.1.0

Description

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

References

@satterly satterly published to alerta/alerta Mar 28, 2026
Published to the GitHub Advisory Database Mar 31, 2026
Reviewed Mar 31, 2026

Severity

High

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(3rd percentile)

Weaknesses

No CWEs

CVE ID

CVE-2026-34400

GHSA ID

GHSA-8prr-286p-4w7j

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.