pathfix
This report shows the evidence for pathfix@3.0.12. 3 of 3 known versions are blocked or flagged. See all versions.
OpenSSF/OSV Malicious Advisory
imported 4mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-5989 confirms this npm version as malicious.
Advisory
MAL-2026-5989
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in pathfix (npm)
Details
pathfix presents itself as a Stylus port of normalize.css but ships a copy of the unrelated normalize-path module with an appended remote-code-execution gadget. On module load, index.js invokes initPlugin(), which uses the `request` library to GET a configurable URL and evaluates the response body's `.cookie` field as JavaScript via `new (Function.constructor)('require', JSON.parse(b).cookie)(require)` (index.js line 71), giving the fetched code full `require` access on the installer's machine. initPlugin() is also re-exported as the package's main export, so any caller that passes a URL triggers the eval path. Although the default URL is blank in this published version, the gadget is fully wired and runs automatically on require(). The package metadata (description and keywords claiming normalize.css/stylus relevance) is a cover story to attract installs from developers searching for normalize-path or normalize.css, and the dependency list (express, sqlite3, axios, request) is unrelated to the package's stated purpose and inflates the install graph.
## Source: ghsa-malware (fb5a3f82683552a878fb98f68cb1508752ba024715de996f07c8bf571be24248) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to pathfix@3.0.12.
The same advisory and Firewall decision cover 3 recorded versions
3.0.10, 3.0.11, 3.0.12
The versions list below shows the verdict for each recorded version.
- Avoid installing pathfix@3.0.12. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.