SQL InjectionWeakness · CWE-89

CVE-2026-40887

CRITICAL · 9.1 CVSS v3.1 Published 2026-04-21
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Unauthenticated SQL injection in Vendure Shop API allows arbitrary SQL execution via user-controlled query string parameter interpolated directly into raw SQL without parameterization. The vulnerability affects all supported database backends (PostgreSQL, MySQL/MariaDB, SQLite) and stems from the languageCode parameter being used in raw SQL expressions.

MitigationImmediately upgrade to patched versions 2.3.4, 3.5.7, or 3.6.2, or apply the hotfix that validates languageCode input via RequestContextService.getLanguageCode to block injection payloads before reaching queries.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Vendure installation and version
    Locate the Vendure application directory and check package.json for the @vendure/core version, or query the running application's health/metadata endpoint if available
    Affected if The installed version is below 2.3.4, below 3.5.7, or below 3.6.2 (specifically any 0.x, 1.x, 2.0.0-2.3.3, 3.0.0-3.5.6, or 3.6.0-3.6.1)
  2. Verify Shop API is exposed
    Inspect the vendure.config.ts file and look for the apiOptions.shopApi configuration; check if the Shop API endpoint is accessible over the network without authentication
    Affected if The Shop API (shopApi: true or similar) is enabled and reachable without authentication on the server
  3. Identify languageCode parameter usage in API routes
    Search the codebase for usage of languageCode in GraphQL resolvers or REST endpoints, specifically looking for raw SQL queries or query builder calls that use this parameter; inspect files under src/plugins/ or similar resolver locations
    Affected if The application code contains raw SQL queries or query builders that incorporate the languageCode query parameter without parameterized binding
  4. Check database query logging
    Enable and review database query logs (PostgreSQL log_statement, MySQL general_log, or SQLite debug flags) to look for suspicious SQL patterns involving languageCode values in WHERE clauses or similar constructs
    Affected if Unusual or malicious SQL patterns appear in logs with languageCode values that suggest injection attempts or direct string interpolation
  5. Review API access patterns
    Analyze HTTP access logs for requests to Shop API endpoints containing languageCode parameters with unusual characters (quotes, semicolons, UNION, SELECT keywords)
    Affected if Requests to Shop API endpoints show languageCode values containing SQL metacharacters or common injection patterns

You are affected if your Vendure installation version is below 2.3.4, 3.5.7, or 3.6.2 AND the Shop API is accessible without authentication AND your application uses the languageCode parameter in database queries.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Immediately upgrade to patched versions 2.3.4, 3.5.7, or 3.6.2, or apply the hotfix that validates languageCode input via RequestContextService.getLanguageCode to block injection payloads before reaching queries.

Recommended fix High confidence

Vendure 2.3.4, 3.5.7, or 3.6.2 (depending on your current major version line)

  1. Identify the currently installed Vendure version by checking package.json or the node_modules/vendure-core/package.json
  2. If running Vendure 1.x: upgrade to version 3.5.7 or 3.6.2 (these contain the security fix)
  3. If running Vendure 2.x: upgrade to version 2.3.4
  4. If running Vendure 3.x: upgrade to version 3.5.7 or 3.6.2
  5. Run `npm install` or `yarn install` to update dependencies
  6. Restart the Vendure server to apply the changes
  7. Verify the Shop API endpoint no longer accepts SQL injection payloads in the languageCode parameter
  8. If immediate upgrade is not possible, apply the hotfix by modifying `packages/core/src/service/helpers/request-context/request-context.service.ts` to validate languageCode input using RequestContextService.getLanguageCode before it reaches any query
Caveat Upgrading across major version lines (e.g., 1.x to 3.x) likely introduces breaking changes; review the Vendure migration guides for your target version

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation3.0 h
  • Implementation4.0 h
  • Testing6.0 h
  • Review / QA3.0 h
16.0 hours of engineering $2,760
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,416.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-40887 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-40887 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data