CVE-2026-40887: @vendure/core has a SQL Injection vulnerability

CVE-2026-40887 · Severity: critical · CVSS 9.1 · Published 2026-04-21

Vendure is an open-source e-commerce framework used to build online stores. An unauthenticated attacker can inject arbitrary SQL commands by manipulating a query parameter in the Shop API, potentially exposing or deleting sensitive customer and product data, or disrupting service availability. The vulnerability is trivial to exploit and affects all database types that Vendure supports.

Technologies: @vendure/core (npm). Vendors: npm.

Quick answers

Is CVE-2026-40887 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-40887 being exploited in the wild.
How severe is CVE-2026-40887?
Critical severity, with a CVSS score of 9.1, published 21 April 2026.
Which products and versions are affected?
@vendure/core (npm) SEMVER:introduced=3.0.0,fixed=3.5.7.
Is there a fix for CVE-2026-40887?
Yes. @vendure/core (npm): upgrade to 3.5.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-40887 attacked?
It is attacked over the network.
Am I affected by CVE-2026-40887?
Check whether you run @vendure/core (npm) 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.

How to fix

  • @vendure/core (npm): upgrade to 3.5.7 or later
    npm install @vendure/core@3.5.7

Technical details

A SQL injection vulnerability exists in ProductService.findOneBySlug where the languageCode value from the HTTP request context is interpolated directly into a raw SQL CASE expression using a JavaScript template literal, bypassing TypeORM's parameterization. The languageCode originates from the query string and is cast to a TypeScript type at compile time but receives no runtime validation, allowing an attacker to inject SQL syntax. An unauthenticated attacker can append a crafted languageCode parameter to any Shop API request to execute arbitrary SQL against PostgreSQL, MySQL/MariaDB, or SQLite backends. The vulnerability has been patched in versions 2.3.4, 3.5.7, and 3.6.2 by adding input validation and converting the interpolation to a parameterized query.

Affected products

  • Vendure @vendure/core >=1.7.4, <2.3.4; >=3.0.0, <3.5.7; >=3.6.0, <3.6.2

Identifiers

  • CVE-2026-40887
  • GHSA-9pp3-53p2-ww9v

Timeline

  • 2026-04-13: disclosed
  • 2026-04-14: patched: Patched versions 2.3.4, 3.5.7, and 3.6.2 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.