Advisory

PYSEC-2026-2341

Also known as: CVE-2026-34400, GHSA-8prr-286p-4w7j

Summary

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

Details

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

Severity

Not rated by the source.

Dates

Published
2026-07-13 14:36 UTC
Modified
2026-07-13 16:31 UTC

Affected packages and fixes

alerta-server

PyPI · All systems

Affected

  • introduced 0, fixed 9.1.0 (ecosystem)

Fixed versions

9.1.0

Fix

  • Fixed version 9.1.0
    pip install --upgrade alerta-server==9.1.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences