# CVE-2022-40764: Snyk CLI affected by Command Injection vulnerability

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.62%, higher than 50% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-10-03T14:03:59.000Z
- Modified: 2026-06-17T05:02:00.423Z
- Also known as: GHSA-hpqj-7cj6-hfj8
- Weaknesses: CWE-78
- Assigned by: mitre

## Description

Snyk CLI before 1.996.0 allows arbitrary command execution, affecting Snyk IDE plugins and the snyk npm package. Exploitation could follow from the common practice of viewing untrusted files in the Visual Studio Code editor, for example. The original demonstration was with shell metacharacters in the vendor.json ignore field, affecting snyk-go-plugin before 1.19.1. This affects, for example, the Snyk TeamCity plugin (which does not update automatically) before 20220930.142957.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- snyk (npm): before 1.996.0
- snyk-go-plugin (npm): before 1.19.1
- snyk cli: before 1.996.0
- snyk golang_cli: before 1.19.1

## Every score

- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://www.imperva.com/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution/> (exploit, technical-description, third-party-advisory)
- <https://github.com/snyk/snyk-go-plugin/releases/tag/v1.19.1> (patch, release-notes, third-party-advisory, web)
- <https://github.com/snyk/cli/releases/tag/v1.996.0> (patch, release-notes, third-party-advisory, web)
- <https://support.snyk.io/hc/en-us/articles/7015908293789-CVE-2022-40764-Command-Injection-vulnerability-affecting-Snyk-CLI-versions-prior-to-1-996-0> (patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-40764> (advisory)
- <https://github.com/snyk/cli> (package)
- <https://www.imperva.com/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution> (web)

## Sources

- CVE List: [CVE-2022-40764](https://www.cve.org/CVERecord?id=CVE-2022-40764), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-hpqj-7cj6-hfj8](https://github.com/advisories/GHSA-hpqj-7cj6-hfj8), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-40764](https://nvd.nist.gov/vuln/detail/CVE-2022-40764), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-40764 · Whole record: https://cve.day/CVE-2022-40764.json · Rebuilt by cve.day 2026-11-25T22:58:15.418Z
