Malicious package · npm
Malicious code in grammy-key (npm)
2.8.72.8.9No safe version. Remove it.What it does
Impersonates the cors middleware (author/repository copied from expressjs/cors). When lib/index.js is loaded on Linux it appends a hard-coded attacker SSH public key (comment wolf@DESKTOP-5FMUF83) to ~/.ssh/authorized_keys, giving the attacker persistent remote access. It then sends the victim's public IP (from ipinfo[.]io), username and platform to hxxps://grammy[.]validator[.]icu/v1/check. A package of the same name is listed in the DataDog malicious-software-packages-dataset. Reported to npm on 2026-11-25 and replaced with a security holding package (0.0.1-security) on 2026-11-25.
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 grammy-keySources