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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.1
- **CVSS:** 9.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 2.20% (percentile 83, 2026-11-26)
- **CWE:** CWE-89
- **Aliases:** GHSA-9pp3-53p2-ww9v
- **Published:** 2026-04-14T22:38:01.000Z
- **Modified:** 2026-10-26T22:10:00.163Z

## Who should check

- Projects that depend on npm package @vendure/core (\>= 3.0.0, \< 3.5.7)
- Anyone running vendurehq vendure \>= 3.0.0, \< 3.5.7; \>= 3.6.0, \< 3.6.2; \>= 1.7.4, \< 2.3.4

## Description

Vendure is an open-source headless commerce platform. Starting in version 1.7.4 and prior to versions 2.3.4, 3.5.7, and 3.6.2, an unauthenticated SQL injection vulnerability exists in the Vendure Shop API. A user-controlled query string parameter is interpolated directly into a raw SQL expression without parameterization or validation, allowing an attacker to execute arbitrary SQL against the database. This affects all supported database backends (PostgreSQL, MySQL/MariaDB, SQLite). The Admin API is also affected, though exploitation there requires authentication. Versions 2.3.4, 3.5.7, and 3.6.2 contain a patch. For those who are unable to upgrade immediately, Vendure has made a hotfix available that uses \`RequestContextService.getLanguageCode\` to validate the \`languageCode\` input at the boundary. This blocks injection payloads before they can reach any query. The hotfix replaces the existing \`getLanguageCode\` method in \`packages/core/src/service/helpers/request-context/request-context.service.ts\`. Invalid values are silently dropped and the channel's default language is used instead. The patched versions additionally convert the vulnerable SQL interpolation to a parameterized query as defense in depth.

## Affected and fixed versions

- npm `@vendure/core`: affected \>= 3.0.0, \< 3.5.7; fixed 3.5.7, 3.6.2, 2.3.4 (osv)
- vendurehq vendure: \>= 3.0.0, \< 3.5.7; \>= 3.6.0, \< 3.6.2; \>= 1.7.4, \< 2.3.4 (cvelist)

## Mitigation

- Upgrade @vendure/core to one of 3.5.7, 3.6.2, 2.3.4 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-40887. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-40887.md
Affected: @vendure/core >= 3.0.0, < 3.5.7
Fixed in: 3.5.7, 3.6.2, 2.3.4

Steps:
1. Search this machine and project for @vendure/core (npm), vendurehq vendure: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-40887 being exploited?

There is no confirmed exploitation: CVE-2026-40887 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.20% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-40887?

Critical: CVSS 9.1 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-40887?

@vendure/core \>= 3.0.0, \< 3.5.7.

### Is there a fix for CVE-2026-40887?

Yes. Fixed in 3.5.7, 3.6.2, 2.3.4. Upgrade @vendure/core to one of 3.5.7, 3.6.2, 2.3.4 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-40887?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/vendurehq/vendure/security/advisories/GHSA-9pp3-53p2-ww9v>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-40887>
- other: <https://github.com/vendurehq/vendure>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-40887>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-9pp3-53p2-ww9v> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-40887> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-40887>
