Malicious package · npm
Malicious code in juyip-parser-helper (npm)
1.0.01.0.11.0.21.0.31.0.4No safe version. Remove it.What it does
In version 1.0.3 the index.js differs from the already listed 1.0.2 in one line: the top-level process.env.PATH = '.'; became process.env.PATH = '..';. On require, the importing process's PATH is replaced with the parent directory, so every command the host process later runs by bare name resolves from there (the module's own listAssets does too when called with useProcessPath: true).
The package is published as a zlib compression helper but exhibits two behaviors inconsistent with that purpose. First, at module top level on require('juyip-parser-helper') it executes process.env.PATH = '.', overwriting the importing process's PATH environment variable with the current working directory. Any subsequent unqualified shell lookup performed by the host process (e.g. ls, node, git, sh) will then resolve binaries from CWD before any system path, which enables local binary-planting hijacks against the process that imported the module. Second, the module ships a hardcoded AES-128-CBC ciphertext blob with a hardcoded key (abcdefghijklmnop) and IV and exposes a createTestAssets() function that decrypts the blob with createDecipheriv and returns the plaintext; the README does not disclose this encrypted payload or document the function. Neither behavior is consistent with a zlib compression helper, and the PATH mutation on import directly tampers with the installer process's execution environment.
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-helperSources