CVE-2022-40764 json
Snyk CLI affected by Command Injection vulnerability
published 4y ago modified 4mo ago also GHSA-hpqj-7cj6-hfj8 , EUVD-2022-7108
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 49%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm snyk 1.996.0
- npm snyk-go-plugin 1.19.1
- snyk cli 1.996.0
- snyk golang_cli 1.19.1
Is CVE-2022-40764 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-40764 updated cvss 7.8
snyk: Command Injection vulnerability affecting Snyk CLI
-
Red Hat OpenShift Service Mesh 2 openshift-service-mesh/kiali-rhel8 Red Hat OpenShift Service Mesh 2.0 openshift-service-mesh/kiali-rhel8 Red Hat OpenShift Service Mesh 2.1 openshift-service-mesh/kiali-rhel8affected: no fix planned “Will not fix”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.61% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- imperva.com https://www.imperva.com/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | snyk | <1.996.0 |
1.996.0 |
| npm | snyk-go-plugin | <1.19.1 |
1.19.1 |
Classification
- Weakness
-
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
References
-
github.com
/snyk/snyk-go-plugin/releases/tag/v1.19.1
web, patch, release-notes, third-party-advisory
-
github.com
/snyk/cli/releases/tag/v1.996.0
web, patch, release-notes, third-party-advisory
-
support.snyk.io
/hc/en-us/articles/7015908293789-CVE-2022-40764-Command-Injection-vulnerability-affecting-Snyk-CLI-versions-pr
web, patch, vendor-advisory
-
imperva.com
/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution/
exploit, technical-description, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-40764
advisory
-
github.com
/snyk/cli
package
-
imperva.com
/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution
web
Sources
- CVE List CVE-2022-40764
- GitHub Advisory GHSA-hpqj-7cj6-hfj8
- NVD CVE-2022-40764
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.