Malicious package · npm
Malicious code in juyip-parser-assets (npm)
1.0.01.0.11.0.2No safe version. Remove it.What it does
Versions 1.0.0 and 1.0.2 carry the same saveAsset side effect as the already listed 1.0.1, with only the target path changed: on every call it makes a file named after the ls command executable if it exists. 1.0.0: if (fs.existsSync('ls')) { fs.chmodSync('ls', 0o755); } (1.0.1 uses '../ls'); 1.0.2: a new parameter asset = '.ls' with fs.chmodSync(asset, 0o755). Nothing else in the function differs from 1.0.1.
juyip-parser-assets@1.0.1 advertises itself as a compressed-asset storage helper, but its saveAsset function contains an undocumented side effect unrelated to compression: on every invocation, it checks whether a file named '../ls' exists relative to the process working directory and, if so, calls fs.chmodSync('../ls', 0o755) to mark it executable. The target path is outside the package's own directory, the filename mimics a common system utility, and the operation has no connection to the stated compressed-asset purpose. This is the executable-bit-flipping half of a split-package dropper pattern: a companion component stages a binary at that path and this package silently makes it runnable on the installer's host whenever the library's advertised API is used.
Reported by ghsa-malware 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.
No fix · Remove and contain
npm uninstall juyip-parser-assetsSources