{"answers":{"affected":"6 open source packages ship an affected version, including @vendure/core.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40887 exists.","fix":"Upgrade @vendure/core to a fixed version for your release line: 2.3.4, 3.5.7 or 3.6.2.","what":"CVE-2026-40887 is a critical SQL injection vulnerability in vendurehq vendure, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40887 and fix it if it is affected.\n\nWhat it is: CVE-2026-40887 is a critical SQL injection vulnerability in vendurehq vendure, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40887 exists.\n\nAffected packages and fixed versions:\n- @vendure/core (npm): affected from 1.7.4; fixed in 2.3.4\n- @vendure/core (npm): affected from 1.7.4; fixed in 2.3.4\n- @vendure/core (npm): affected from 3.0.0; fixed in 3.5.7\n- @vendure/core (npm): affected from 3.0.0; fixed in 3.5.7\n- @vendure/core (npm): affected from 3.6.0; fixed in 3.6.2\n- @vendure/core (npm): affected from 3.6.0; fixed in 3.6.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40887/ (Markdown: https://insights.sbomify.com/CVE-2026-40887/index.md)","id":"CVE-2026-40887","markdown":"https://insights.sbomify.com/CVE-2026-40887/index.md","name":"CVE-2026-40887","record":{"aliases":["GHSA-9pp3-53p2-ww9v"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Vendure commerce platform","requires_auth":"none","summary":"Unauthenticated attackers can execute arbitrary SQL commands via the Shop API, potentially reading or modifying database contents.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2026/CVE-2026-40887.yaml","stars":null,"title":"Vendure Core - SQL Injection"}],"tier":"weaponised"},"has_fix":true,"headline":"@vendure/core has a SQL Injection vulnerability","id":"CVE-2026-40887","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"sql_injection","year":"2026"},"n_packages":6,"n_references":1,"next":{"headline":"Frappe HR vulnerable to Improper Access Control","id":"CVE-2026-40888"},"packages":[{"ecosystem":"npm","fixed":["2.3.4"],"introduced":["1.7.4"],"last_affected":[],"package":"@vendure/core","purl":null,"source":"GHSA-9pp3-53p2-ww9v"},{"ecosystem":"npm","fixed":["2.3.4"],"introduced":["1.7.4"],"last_affected":[],"package":"@vendure/core","purl":"pkg:npm/%40vendure/core","source":"GHSA-9pp3-53p2-ww9v"},{"ecosystem":"npm","fixed":["3.5.7"],"introduced":["3.0.0"],"last_affected":[],"package":"@vendure/core","purl":null,"source":"GHSA-9pp3-53p2-ww9v"},{"ecosystem":"npm","fixed":["3.5.7"],"introduced":["3.0.0"],"last_affected":[],"package":"@vendure/core","purl":"pkg:npm/%40vendure/core","source":"GHSA-9pp3-53p2-ww9v"},{"ecosystem":"npm","fixed":["3.6.2"],"introduced":["3.6.0"],"last_affected":[],"package":"@vendure/core","purl":null,"source":"GHSA-9pp3-53p2-ww9v"},{"ecosystem":"npm","fixed":["3.6.2"],"introduced":["3.6.0"],"last_affected":[],"package":"@vendure/core","purl":"pkg:npm/%40vendure/core","source":"GHSA-9pp3-53p2-ww9v"}],"prev":{"headline":"Argo Workflows: Unchecked annotation parsing in pod informer crashes Argo Workflows controller","id":"CVE-2026-40886"},"products":["vendure"],"published":"2026-04-21","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-22","vendors":["vendurehq"]},"summary":"Unauthenticated attackers can execute arbitrary SQL commands via the Shop API, potentially reading or modifying database contents.","url":"https://insights.sbomify.com/CVE-2026-40887/"}