GitHub Advisoryadvisory · PyPI

GHSA-8prr-286p-4w7j alerta-server has potential SQL Injection vulnerability in Query String Syntax (q=) API

MEDIUM Published 2026-03-31 Modified 2026-04-06 Official page ↗
Aliases
CVE-2026-34400
Ecosystem
PyPI
Packages
alerta-server
Severity
Moderate
CVSS vector
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
Weaknesses
CWE-89
Reviewed
2026-03-31

Affected packages

• PyPI alerta-server: < 9.1.0 → fixed in 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

Related

Alias · CVE (1)

Weakness · CWE (1)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness

References