Pnpm: Untrusted Search Path
CVE-2022-26183 is a high-severity untrusted search path vulnerability in Pnpm, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. The record lists version 6.15.1 as the first without the flaw, so updating Pnpm to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 1.59% chance of exploitation within 30 days, higher than 76% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Pnpm to 6.15.1 or a later version.
Affected products and versions
Version data comes from NVD's product matching. 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
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- 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:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.8 | High | NVD |
| CVSS 2.0 | 6.5 | Medium | NVD |
Official description
PNPM v6.15.1 and below was discovered to contain an untrusted search path which causes the application to behave in unexpected ways when users execute PNPM commands in a directory containing malicious content. This vulnerability occurs when the application is ran on Windows OS.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Untrusted Search Path
The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.
How developers prevent this class of flaw
- Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
- When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.
- Remove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Technical write-ups (may include proof of concept)
- sonarsource.com/blog/securing-developer-tools-package-managers/Exploit, Third Party Advisory
Other vulnerabilities in Pnpm
- 7.1 High severity
- 7.4 High severity
- 7.5 High severity
- 7.1 High severity
- 7.1 High severity
- 8.2 High severity
Recent Untrusted Search Path vulnerabilities
- 9.8 Critical severity
- 7.0 High severity
- 7.8 High severity
- 7.3 High severity
- 6.9 Medium severity
Spotted an error? Tell us.