path-internal@1.0.10
Malicious code in path-internal (npm)
Analysis
This package impersonates the Node.js core path module: package.json points main at path.js, which is a verbatim copy of the upstream Node path implementation with a hidden payload spliced into the middle of the file. As soon as the module is required/imported, a self-invoking function fetches a JSON document from a hardcoded paste-style URL (base64-encoded in the source as the constant randomStringRe, decoding to hxxps://www[.]jsonkeeper[.]com/b/HQVPL), reads its content field, and passes it straight to eval(). This is a remote code loader: the attacker can serve arbitrary JavaScript from that endpoint and have it executed on any machine that imports the package, with no further user interaction. A second hardcoded URL (hxxps://www[.]jsonkeeper[.]com/b/HI4TR) is present for an identical, currently commented-out second-stage loader. The package declares axios, request and execp as dependencies, consistent with downloading and executing further payloads.
- analyzed by
- Leitwacht
- first seen
- Jun 8, 2026, 09:51 PM
- analyzed
- Jun 28, 2026, 06:30 AM
- weekly installs
- 1,114
Related advisories
- path-internal@1.0.15 same package
- autotel-tanstack@1.13.27
- ezymail@2.0.6
- @immobiliarelabs/backstage-plugin-gitlab-backend@3.0.3
- anthropic-internal-tools@1.0.0
- @apexcraft/nano-key@1.3.5
- codyx-ai-linux-x64-musl@1.14.42
- leo-aws@2.0.4
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.