cvelo
P2 · HighMalware

Malicious code in approve-audit (npm)

  • GHSA-c2r9-jmw4-552r

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](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/6653de4cde120b59c3c56d038de2993ca91e2d9b/osv/malicious/npm/approve-audit/MAL-2026-20042.json))

Text from the GitHub Advisory record.

Recommendation

Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.

Affected

  • approve-auditnpm

    No versions listed

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.