charape
Affected
- introduced
0(semver)
Fixed versions
None listed
Fix
No fixed version is listed.
Advisory
Also known as: GHSA-5cf4-p7m8-x53q
Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.
Malicious code in charape (npm)
---
_-= Per source details. Do not edit below this line.=-_
Source: amazon-inspector (05ad44922460c7e3465c66a6271d96bddfabdcedc88fc9dc6efed12ba53b6460)
On install, charape's postinstall script walks to the installer project's node_modules and unconditionally overwrites the package.json, index.js, and index.cjs of three unrelated packages — @whiskeysockets/baileys, @adiwajshing/baileys, and baileys — replacing their entry files with re-exports of charape's own code via relative paths. This runs even when the installer never opted into the documented npm:charape alias and even when those packages were already installed as legitimate dependencies of other code in the project. After this rewrite, any require('baileys') / require('@whiskeysockets/baileys') / require('@adiwajshing/baileys') elsewhere in the installer's application silently loads charape's code instead, giving charape runtime control over every call path that previously went through upstream Baileys. The same postinstall additionally writes or appends 'legacy-peer-deps=true' into the installer project's.npmrc, which suppresses the peer-dependency conflicts that overwriting those sibling packages would otherwise surface, hiding the hijack from normal npm resolution errors. lib/index.cjs is a bundled Baileys-shaped runtime whose exported APIs will therefore execute in place of the real packages for every consumer in the installer's tree.
Source: ghsa-malware (642f1d05c7f56e4648be237af99c1dc703e0dd7d829cb398379f01de3e2f3385)
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