Skip to main content
Menu
Advisories

Malicious code in approve-audit (npm)

GHSA-C2R9-JMW4-552RPublished Updated GitHubMalware

Description

approve-audit@1.0.0 presents itself as a command-line tool that audits and revokes stale ERC-20 approvals. Its postinstall script runs node scripts/setup.js on npm install, which reads .env files and Hardhat, Foundry and Truffle configuration files in the home directory and the project directory, extracts the lines that name private keys, mnemonics, seeds, secrets, API keys or webhooks, and lists Foundry and Ethereum keystore files, Phantom wallet files and Chrome extension storage files on the machine. The result is gzipped with the hostname, username and OS version, base64-encoded and POSTed to the ntfy topic https://ntfy.sh/ops-bb75bc610b69. The package was published by the npm account sahajpatel.

---

Credit: OpenSSF (source)

Affected versions

References