# CVE-2022-22984: Command Injection

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.0
- **CVSS:** 5.0 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L/E:P`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low; E: P
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 4.19% (percentile 92, 2026-11-26)
- **CWE:** CWE-78
- **Aliases:** GHSA-4x6g-3cmx-w76r
- **Published:** 2022-11-30T00:00:00.000Z
- **Modified:** 2026-06-17T04:29:17.583Z

## Who should check

- Projects that depend on npm package snyk (\< 1.1064.0)
- Projects that depend on npm package snyk-mvn-plugin (\< 2.31.3)
- Projects that depend on npm package snyk-sbt-plugin (\< 2.16.2)
- Projects that depend on npm package snyk-python-plugin (\< 1.24.2)
- Projects that depend on npm package @snyk/snyk-hex-plugin (\< 1.1.6)
- Projects that depend on npm package snyk-gradle-plugin (\< 3.24.5)
- Projects that depend on npm package snyk-docker-plugin (\< 5.6.5)
- Projects that depend on npm package @snyk/snyk-cocoapods-plugin (\< 2.5.3)

## Description

The package snyk before 1.1064.0; the package snyk-mvn-plugin before 2.31.3; the package snyk-gradle-plugin before 3.24.5; the package @snyk/snyk-cocoapods-plugin before 2.5.3; the package snyk-sbt-plugin before 2.16.2; the package snyk-python-plugin before 1.24.2; the package snyk-docker-plugin before 5.6.5; the package @snyk/snyk-hex-plugin before 1.1.6 are vulnerable to Command Injection due to an incomplete fix for \[CVE-2022-40764\](https://security.snyk.io/vuln/SNYK-JS-SNYK-3037342). A successful exploit allows attackers to run arbitrary commands on the host system where the Snyk CLI is installed by passing in crafted command line flags. In order to exploit this vulnerability, a user would have to execute the snyk test command on untrusted files. In most cases, an attacker positioned to control the command line arguments to the Snyk CLI would already be positioned to execute arbitrary commands. However, this could be abused in specific scenarios, such as continuous integration pipelines, where developers can control the arguments passed to the Snyk CLI to leverage this component as part of a wider attack against an integration/build pipeline. This issue has been addressed in the latest Snyk Docker images available at https://hub.docker.com/r/snyk/snyk as of 2022-11-29. Images downloaded and built prior to that date should be updated. The issue has also been addressed in the Snyk TeamCity CI/CD plugin as of version v20221130.093605.

## Affected and fixed versions

- npm `snyk`: affected \< 1.1064.0; fixed 1.1064.0 (osv)
- npm `snyk-mvn-plugin`: affected \< 2.31.3; fixed 2.31.3 (osv)
- npm `snyk-sbt-plugin`: affected \< 2.16.2; fixed 2.16.2 (osv)
- npm `snyk-python-plugin`: affected \< 1.24.2; fixed 1.24.2 (osv)
- npm `@snyk/snyk-hex-plugin`: affected \< 1.1.6; fixed 1.1.6 (osv)
- npm `snyk-gradle-plugin`: affected \< 3.24.5; fixed 3.24.5 (osv)
- npm `snyk-docker-plugin`: affected \< 5.6.5; fixed 5.6.5 (osv)
- npm `@snyk/snyk-cocoapods-plugin`: affected \< 2.5.3; fixed 2.5.3 (osv)
- snyk: \>= unspecified, \< 1.1064.0 (cvelist)
- snyk-mvn-plugin: \>= unspecified, \< 2.31.3 (cvelist)
- snyk-gradle-plugin: \>= unspecified, \< 3.24.5 (cvelist)
- @snyk/snyk-cocoapods-plugin: \>= unspecified, \< 2.5.3 (cvelist)
- snyk-sbt-plugin: \>= unspecified, \< 2.16.2 (cvelist)
- snyk-python-plugin: \>= unspecified, \< 1.24.2 (cvelist)
- snyk-docker-plugin: \>= unspecified, \< 5.6.5 (cvelist)
- @snyk/snyk-hex-plugin: \>= unspecified, \< 1.1.6 (cvelist)

## Mitigation

- Upgrade snyk to 1.1064.0 or later.
- Upgrade snyk-mvn-plugin to 2.31.3 or later.
- Upgrade snyk-sbt-plugin to 2.16.2 or later.
- Upgrade snyk-python-plugin to 1.24.2 or later.
- Upgrade @snyk/snyk-hex-plugin to 1.1.6 or later.
- Upgrade snyk-gradle-plugin to 3.24.5 or later.
- Upgrade snyk-docker-plugin to 5.6.5 or later.
- Upgrade @snyk/snyk-cocoapods-plugin to 2.5.3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-22984. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-22984.md
Affected: snyk < 1.1064.0; snyk-mvn-plugin < 2.31.3; snyk-sbt-plugin < 2.16.2; snyk-python-plugin < 1.24.2; @snyk/snyk-hex-plugin < 1.1.6; snyk-gradle-plugin < 3.24.5; snyk-docker-plugin < 5.6.5; @snyk/snyk-cocoapods-plugin < 2.5.3
Fixed in: 1.1064.0, 2.31.3, 2.16.2, 1.24.2, 1.1.6, 3.24.5, 5.6.5, 2.5.3

Steps:
1. Search this machine and project for snyk (npm), snyk-mvn-plugin (npm), snyk-sbt-plugin (npm), snyk-python-plugin (npm), @snyk/snyk-hex-plugin (npm), snyk-gradle-plugin (npm): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-22984 being exploited?

There is no confirmed exploitation: CVE-2022-22984 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 4.19% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-22984?

Medium: CVSS 5.0 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2022-22984?

snyk \< 1.1064.0; snyk-mvn-plugin \< 2.31.3; snyk-sbt-plugin \< 2.16.2; snyk-python-plugin \< 1.24.2; @snyk/snyk-hex-plugin \< 1.1.6; snyk-gradle-plugin \< 3.24.5; snyk-docker-plugin \< 5.6.5; @snyk/snyk-cocoapods-plugin \< 2.5.3.

### Is there a fix for CVE-2022-22984?

Yes. Fixed in 1.1064.0, 2.31.3, 2.16.2, 1.24.2, 1.1.6, 3.24.5, 5.6.5, 2.5.3. Upgrade snyk to 1.1064.0 or later. Upgrade snyk-mvn-plugin to 2.31.3 or later. Upgrade snyk-sbt-plugin to 2.16.2 or later. Upgrade snyk-python-plugin to 1.24.2 or later. Upgrade @snyk/snyk-hex-plugin to 1.1.6 or later. Upgrade snyk-gradle-plugin to 3.24.5 or later. Upgrade snyk-docker-plugin to 5.6.5 or later. Upgrade @snyk/snyk-cocoapods-plugin to 2.5.3 or later.

### How do I check if I'm affected by CVE-2022-22984?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2022-22984>
- patch: <https://github.com/snyk/cli/commit/80d97a93326406e09776156daf72e3caa03ae25a>
- patch: <https://github.com/snyk/snyk-gradle-plugin/commit/bb1c1c72a75e97723a76b14d2d73f70744ed5009>
- patch: <https://github.com/snyk/snyk-mvn-plugin/commit/02cda9ba1ea36b00ead3f6ec2de0f97397ebec50>
- patch: <https://github.com/snyk/snyk-sbt-plugin/commit/99c09eb12c9f8f2b237aea9627aab1ae3cab6437>
- patch: <https://github.com/snyk/snyk-hex-plugin/commit/e8dd2a330b40d7fc0ab47e34413e80a0146d7ac3>
- patch: <https://github.com/snyk/snyk-python-plugin/commit/8591abdd9236108ac3e30c70c09238d6bb6aabf4>
- patch: <https://github.com/snyk/snyk-cocoapods-plugin/commit/c73e049c5200772babde61c40aab57296bf91381>
- patch: <https://github.com/snyk/snyk-docker-plugin/commit/d730d7630691a61587b120bb11daaaf4b58a8357>
- exploit: <https://www.imperva.com/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution/>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYK-3038622>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYKMVNPLUGIN-3038623>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYKGRADLEPLUGIN-3038624>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYKSNYKCOCOAPODSPLUGIN-3038625>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYKSBTPLUGIN-3038626>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYKPYTHONPLUGIN-3039677>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYKDOCKERPLUGIN-3039679>
- exploit: <https://security.snyk.io/vuln/SNYK-JS-SNYKSNYKHEXPLUGIN-3039680>
- other: <https://www.imperva.com/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-22984>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-4x6g-3cmx-w76r> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2022-22984> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-22984>
