CVE-2026-40906: Electric: SQL Injection via ORDER BY Parameter in Shape API
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.
Security readout for executives and security teams
Plain-English summary
Electric deployments in the affected version range have a critical flaw in a sync API parameter. An authenticated user could abuse it to compromise the connected PostgreSQL database, including reading, changing, or deleting data. The vendor states the issue is fixed in Electric 1.5.0.
Executive priority
Prioritize remediation immediately for any production Electric deployment in the affected range. The business risk is full compromise of synced PostgreSQL data, including loss, tampering, and disclosure. Absence of confirmed exploitation reduces certainty about current attacks, not the severity of exposure.
Technical view
CVE-2026-40906 is a CWE-89 error-based SQL injection in ElectricSQL Electric’s /v1/shape API order_by parameter. Affected versions are 1.1.12 through before 1.5.0. The CVSS 3.1 score is 10.0, reflecting network reachability, low complexity, required low privileges, changed scope, and high confidentiality, integrity, and availability impact.
Likely exposure
Exposure is limited to Electric deployments running versions >=1.1.12 and <1.5.0 where authenticated users can access the /v1/shape API. The database at risk is the PostgreSQL database connected to Electric. The provided sources do not identify additional affected products or CPEs.
Exploitation context
The source bundle does not show CISA KEV listing or other cited evidence of active exploitation. The advisory’s impact statement is still severe: any authenticated user may be able to affect the full PostgreSQL database through crafted ORDER BY expressions. Treat internet-accessible or broadly authenticated deployments as urgent.
Researcher notes
The key validation path is version and route exposure, not exploit reproduction. Sources describe authenticated SQL injection through order_by and a fixed version, but do not provide broader product impact or confirmed exploitation. Avoid assuming unauthenticated exposure unless local deployment details show authentication is bypassed or weak.
Mitigation direction
Upgrade Electric to version 1.5.0 or later.
Review the GitHub security advisory before applying compensating controls.
Restrict access to the /v1/shape API until patched.
Review database backups and recovery readiness.
Reduce database privileges used by Electric where operationally possible.
Validation and detection
Inventory Electric deployments and record exact versions.
Confirm no deployment runs Electric >=1.1.12 and <1.5.0.
Identify which users or services can authenticate to /v1/shape.
Review application and database logs for unusual order_by-related errors.
Verify the deployed package includes the vendor fix from 1.5.0.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-89: Database access and collection lookup
Injection into data stores can inform collection, data access, and exfiltration detection reviews. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references database injection or access, so collection and exfiltration review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
6Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.