snyk: Improper Neutralization of Special Elements used in an OS Command
CVE-2022-24441 is a high-severity improper neutralization of special elements used in an OS command vulnerability in snyk, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version 1.1064.0 as the first without the flaw, so updating snyk to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.79% chance of exploitation within 30 days, higher than 57% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update snyk to 1.1064.0 or a later version.
- Update Snyk Cli to 1.1064.0 or a later version.
- Read the advisory on security.snyk.io for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Snyk | snyk | before 1.1064.0 | 1.1064.0 |
| Snyk | Snyk Cli | before 1.1064.0 | 1.1064.0 |
| Snyk | Snyk Language Server | 20221109.114426 and earlier | Not stated |
| Snyk | Snyk Security | 1.1.30 and earlier; 1.8.0 and earlier; 2.4.47 and earlier; 20221115.132308 and earlier | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 5.8 | Medium | CNA (snyk.io) |
| CVSS 3.1 | 8.8 | High | NVD |
Official description
The package snyk before 1.1064.0 are vulnerable to Code Injection when analyzing a project. An attacker who can convince a user to scan a malicious project can include commands in a build file such as build.gradle or gradle-wrapper.jar, which will be executed with the privileges of the application. This vulnerability may be triggered when running the the CLI tool directly, or when running a scan with one of the IDE plugins that invoke the Snyk CLI. Successful exploitation of this issue would likely require some level of social engineering - to coerce an untrusted project to be downloaded and analyzed via the Snyk CLI or opened in an IDE where a Snyk IDE plugin is installed and enabled. Additionally, if the IDE has a Trust feature then the target folder must be marked as ‘trusted’ in order to be vulnerable. **NOTE:** This issue is independent of the one reported in [CVE-2022-40764](https://security.snyk.io/vuln/SNYK-JS-SNYK-3037342), and upgrading to a fixed version for this addresses that issue as well. The affected IDE plugins and versions are: - VS Code - Affected: <=1.8.0, Fixed: 1.9.0 - IntelliJ - Affected: <=2.4.47, Fixed: 2.4.48 - Visual Studio - Affected: <=1.1.30, Fixed: 1.1.31 - Eclipse - Affected: <=v20221115.132308, Fixed: All subsequent versions - Language Server - Affected: <=v20221109.114426, Fixed: All subsequent versions
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Neutralization of Special Elements used in an OS Command
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command before it is sent to a downstream component.
How developers prevent this class of flaw
- If at all possible, use library calls rather than external processes to recreate the desired functionality.
- For any data that will be used to generate a command to be executed, keep as much of that data out of external control as possible. For example, in web applications, this may require storing the data locally in the session's state instead of sending it out to the client in a hidden form field.
- For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
More Improper Neutralization of Special Elements used in an OS Command vulnerabilities (CWE-78)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
- github.com/snyk/snyk-eclipse-plugin/commit/b5a8bce25a359ced75f83a729fc6b2393fc9a495Third Party Advisory
- github.com/snyk/snyk-intellij-plugin/commit/56682f4ba6081ce1d95cb980cbfacd3809a826f4Third Party Advisory
- github.com/snyk/snyk-ls/commit/b3229f0142f782871aa72d1a7dcf417546d568edThird Party Advisory
- github.com/snyk/snyk-visual-studio-plugin/commit/0b53dbbd4a3153c3ef9aaf797af3b5caad0f731aThird Party Advisory
- github.com/snyk/vscode-extension/commit/0db3b4240be0db6a0a5c6d02c0d4231a2c4ba708Third Party Advisory
Technical write-ups (may include proof of concept)
- imperva.com/blog/how-scanning-your-projects-for-security-issues-can-lead-to-remote-code-execution/Exploit, Third Party Advisory
Other vulnerabilities in snyk
- 7.2 High severity
Recent Improper Neutralization of Special Elements used in an OS Command vulnerabilities
- 7.8 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 7.8 High severity
- 9.8 Critical severity
Spotted an error? Tell us.