OpenSSF/OSV advisory MAL-2026-14561 confirms this npm version as malicious. The package presents itself as `relative-import-path` (README title, homepage and repository URL point at github.com/marko-js/relative-import-path, and the.d.ts documents only `relativeImportPath`), but the CJS bundle at dist/index.js does not export the documented API. Instead it exports a single undocumented function `modshit(moduleName, size)` that reads `public/logo.png` from the current working directory,...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in module-relpath (npm)
Details
The package presents itself as `relative-import-path` (README title, homepage and repository URL point at github.com/marko-js/relative-import-path, and the.d.ts documents only `relativeImportPath`), but the CJS bundle at dist/index.js does not export the documented API. Instead it exports a single undocumented function `modshit(moduleName, size)` that reads `public/logo.png` from the current working directory, slices the trailing `size` bytes off the file, resolves the path `../${moduleName}/public/logo.png` relative to its own directory, creates parent directories as needed, and writes those trailing bytes to that location. The effect is a steganographic second-stage helper: bytes appended to the tail of a PNG are extracted and planted into an arbitrary sibling package's directory on the installer's disk under the caller's chosen name. The exported symbol does not match the documented API, is named to obscure its purpose, and provides a primitive whose only use is smuggling payload bytes hidden inside an image into other node_modules entries.
## Source: ghsa-malware (97776a8746c6c0d75fee50594f26150e0a791d97ade2056c489c1ca8da0196ae) 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.
Decision reason
No blocking static signals were detected.