CVE-2026-34400: Alerta server SQL Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-8prr-286p-4w7j
CWE-89
Published
Advisory Summary

CVE-2026-34400 is a MODERATE sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Alerta server libraries in the PyPI ecosystem. The issue involves alerta-server has potential sql injection vulnerability in query string syntax (q=) api. Remediation is available by upgrading affected packages to version 9.1.0.

CVE-2026-34400 at a Glance

CVE Identifier CVE-2026-34400
GHSA Identifier GHSA-8prr-286p-4w7j
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Alerta server
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-34400

To remediate this vulnerability, upgrade all affected Alerta server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

alerta-server fixed: 9.1.0
pip install alerta-server>=9.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show alerta-server

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-34400, inspect your installed packages using pip:

pip show alerta-server

Analyze the terminal output to locate any version of Alerta server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.1.0), your application is affected.

Note: The pip show alerta-server command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Alerta server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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

CVE-2026-34400 Affected Alerta server Versions

1 component(s)
Fixed Versions:
9.1.0
Product / Package Ecosystem Affected Versions Fixed Version
alerta-server
PyPI
< 9.1.0
9.1.0

References

Frequently Asked Questions

What is CVE-2026-34400?
CVE-2026-34400 is a security vulnerability in Alerta server involving alerta-server has potential SQL Injection vulnerability in Query String Syntax (q=) API under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Alerta server versions are affected?
Affected versions include releases prior to 9.1.0 across affected packages: alerta-server.
What version fixes CVE-2026-34400?
Upgrading to 9.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is alerta-server affected?
Yes, alerta-server is affected in releases prior to 9.1.0. Upgrade your dependency to 9.1.0 or later.
What CWE is associated with CVE-2026-34400?
CVE-2026-34400 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check PyPI dependencies for CVE-2026-34400?
Run the dependency tree command: 'pip show alerta-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8prr-286p-4w7j",
  "modified" : "2026-04-06T17:37:22Z",
  "published" : "2026-03-31T23:23:21Z",
  "aliases" : [ "CVE-2026-34400" ],
  "summary" : "alerta-server has potential SQL Injection vulnerability in Query String Syntax (q=) API",
  "details" : "### Impact\nThe 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.\n\n### Patches\nFixed 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.\n\n### Workarounds\nUpgrade to v9.1.0 or later. If unable to upgrade, deploy a proxy in front of the Alerta API to sanitize the q= parameter.\n\n### Resources\nhttps://github.com/alerta/alerta/pull/712/files\nhttps://owasp.org/www-community/attacks/SQL_Injection",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "alerta-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/alerta/alerta/security/advisories/GHSA-8prr-286p-4w7j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34400"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alerta/alerta/pull/2040"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alerta/alerta/pull/712"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alerta/alerta/commit/aeba85a37a09e5769a7a2da56481aa979ff99a00"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alerta/alerta/commit/fdd52cd1abad8d02d1dfb8ecdcdbb43b6af3b883"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/alerta/alerta"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alerta/alerta/releases/tag/v9.1.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-31T23:23:21Z",
    "nvd_published_at" : "2026-03-31T22:16:18Z"
  }
}