img-to-native
Affected
- introduced
0(semver)
Fixed versions
None listed
Fix
No fixed version is listed.
Advisory
Also known as: GHSA-pv7p-ghgv-268x
Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.
Malicious code in img-to-native (npm)
---
_-= Per source details. Do not edit below this line.=-_
Source: amazon-inspector (7676788d88c2194b8d5c048decfbe06550798ce342af54f8975bc26422d10c53)
On require() of img-to-native, index.js reads banner.jpg from the.cache directory of its sole dependency cdn-img-fetch, locates a payload appended after the PNG IEND marker, base64-decodes it, and AES-256-CBC decrypts it using a key derived from sha256('nif-runtime-2027'). The decrypted bytes are written to %LOCALAPPDATA%\Programs\NodeRuntime\node_runtime_helper.exe with mode 0o755, and the source image is then unlinked. An fs.watch fallback waits for the image to appear if it is not yet staged. The payload is obfuscated (hidden after a PNG end-of-image marker, base64-encoded, AES-encrypted), unverified (no hash or signature check), and dropped to a persistence-adjacent path with executable bits set. The advertised purpose ("convert image files to native binary representation") does not require decrypting content appended after a PNG IEND chunk to materialize a Windows executable. The companion package cdn-img-fetch is pinned as a caret range (^1.0.0), so future 1.x releases can silently change the delivered payload bytes. Installing or loading this package results in attacker-controlled code being written to the installer's filesystem with execute permission.
Source: ghsa-malware (7131e9cb1bdeb272ae7e26f2877087fd5da8716ef7c08e0fc0bf1359e278df8e)
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.
Not rated by the source.
0 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: OpenSSF Malicious Packages · Apache-2.0