GHSA-8prr-286p-4w7j

Suggest an improvement
Source
https://github.com/advisories/GHSA-8prr-286p-4w7j
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-8prr-286p-4w7j/GHSA-8prr-286p-4w7j.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-8prr-286p-4w7j
Aliases
Published
2026-03-31T23:23:21Z
Modified
2026-04-06T17:46:14.838351Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
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

Database specific
{
    "github_reviewed_at": "2026-03-31T23:23:21Z",
    "nvd_published_at": "2026-03-31T22:16:18Z",
    "cwe_ids": [
        "CWE-89"
    ],
    "severity": "MODERATE",
    "github_reviewed": true
}
References

Affected packages

PyPI / alerta-server

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
9.1.0

Affected versions

3.*
3.1.2
3.2.0
3.2.3
3.2.4
3.2.6
3.2.7
3.2.8
3.2.9
3.3.0
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
3.3.7
4.*
4.0.0
4.0.1
4.0.2
4.0.3
4.0.4
4.0.5
4.0.6
4.0.7
4.0.8
4.0.9
4.1.0
4.1.1
4.1.2
4.1.4
4.1.5
4.1.6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7.2.0
7.2.1
7.2.2
7.2.3
7.2.4
7.2.5
7.2.6
7.2.7
7.2.8
7.2.9
7.2.10
7.2.11
7.3.0
7.3.1
7.3.2
7.4.0
7.4.1
7.4.4
7.4.5
7.4.6
7.5.0
7.5.1
7.5.2
7.5.3
7.5.4
7.5.5
7.5.6
7.5.7
8.*
8.0.0
8.0.1
8.0.2
8.0.3
8.1.0
8.2.0
8.3.0
8.3.1
8.3.2
8.3.3
8.4.0
8.4.1
8.5.0
8.6.0
8.6.2
8.6.3
8.6.4
8.6.5
8.7.0
9.*
9.0.0
9.0.1
9.0.2
9.0.3
9.0.4

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-8prr-286p-4w7j/GHSA-8prr-286p-4w7j.json"