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

Source: https://junglewise.ai/threats/cve-2026-40887-vendure-core-has-a-sql-injection-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/vendure-core). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/vendurehq/vendure/security/advisories/GHSA-9pp3-53p2-ww9v](https://github.com/vendurehq/vendure/security/advisories/GHSA-9pp3-53p2-ww9v)

## Related threats

- [Vendure account takeover in external authentication](https://junglewise.ai/threats/cve-2026-63472-vendure-account-takeover-in-external-authentication)
- [Vendure Shop API authorization bypass via filterOperator](https://junglewise.ai/threats/cve-2026-63461-vendure-shop-api-authorization-bypass-via-filteroperator)
- [Vendure unauthenticated ReDoS in regex filter on SQLite](https://junglewise.ai/threats/cve-2026-63460-vendure-unauthenticated-redos-in-regex-filter-on-sqlite)
- [Vendure timing attack enables user enumeration in NativeAuthenticationStrategy](https://junglewise.ai/threats/cve-2026-25050-vendure-timing-attack-enables-user-enumeration-in)
- [Vendure insecure currencyCode handling in payment processing](https://junglewise.ai/threats/vendure-insecure-currencycode-handling-in-payment-processing-1590a2ac)
