Quick answers
- Is CVE-2026-40906 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40906 being exploited in the wild.
- How severe is CVE-2026-40906?
- Critical severity, with a CVSS score of 9.9, published 21 April 2026.
- Which products and versions are affected?
- ElectricSQL Electric >= 1.1.12, < 1.5.0; ElectricSQL Electric sync-service 1.1.12 to 1.4.x; Red Hat Developer Hub 1.
- Is there a fix for CVE-2026-40906?
- A patch was published on 2026-04-02: Version 1.5.0 released and deployed to Cloud instances Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40906 attacked?
- It is attacked over the network, in a hosted service.
- Am I affected by CVE-2026-40906?
- Check whether you run Electric Sync-Service, ElectricSQL Electric, ElectricSQL Electric sync-service or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
An error-based SQL injection vulnerability exists in the ElectricSQL sync-service due to improper validation of the 'order_by' parameter in the /v1/shape API. The 'Parser.validate_order_by' function utilized a permissive wildcard catch-all in its AST walker, allowing arbitrary SQL expressions (such as SubLink, FuncCall, and TypeCast) to be concatenated directly into the final PostgreSQL query. Attackers can leverage this to extract data via error messages (e.g., using CAST), execute arbitrary DML/DDL via 'dblink_exec', or cause a denial of service. The vulnerability is fixed in version 1.5.0 by implementing a deny-by-default allowlist for AST nodes and rebuilding the SQL clause from the validated AST using 'PgQuery.protobuf_to_query/1'.
Affected products
- ElectricSQL Electric >= 1.1.12, < 1.5.0
- Red Hat Red Hat Developer Hub 1
Timeline
- 2025-10-02: other: Vulnerable code introduced in version 1.1.12
- 2026-04-02: disclosed: Vulnerability reported by Casco
- 2026-04-02: patched: Version 1.5.0 released and deployed to Cloud instances
- 2026-04-21: advisory: CVE-2026-40906 published
References
- https://github.com/electric-sql/electric/pull/4081
- https://github.com/electric-sql/electric/security/advisories/GHSA-h5rg-pxx7-r2hj
- https://access.redhat.com/security/cve/CVE-2026-40906
- https://bugzilla.redhat.com/show_bug.cgi?id=2460291
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40906.json