CVE-2026-40906 Electric: SQL Injection via ORDER BY Parameter in Shape API

Critical 10.0 Published Updated

Authenticated users can execute arbitrary SQL commands via the ORDER BY parameter, allowing full database read, write, and destruction.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-40906?

CVE-2026-40906 is a critical SQL injection vulnerability in electric-sql electric, published on 21 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Electric is a Postgres sync engine. From 1.1.12 to before 1.5.0, the order_by parameter in the ElectricSQL /v1/shape API is vulnerable to error-based SQL injection, allowing any authenticated user to read, write, and destroy the full contents of the underlying PostgreSQL database through crafted ORDER BY expressions. This vulnerability is fixed in 1.5.0.

Weakness: CWE-89

Which versions are affected by CVE-2026-40906?

It affects 1 product.

Products include Electric Sync-Service.

How do I fix CVE-2026-40906?

No fix has been published for CVE-2026-40906 yet. Limit exposure of the affected software until one is available.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-40906 being exploited?

There is no known exploitation of CVE-2026-40906 in the wild and no public exploit code.

Sources

Also known as GHSA-h5rg-pxx7-r2hj.

Is CVE-2026-40906 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free