MAL-2026-20042

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/approve-audit/MAL-2026-20042.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-20042
Published
2026-11-12T15:49:22Z
Modified
2026-11-17T05:45:05Z
Summary
Malicious code in approve-audit (npm)
Details

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.

Database specific
{
    "iocs":  {
        "files":  [
            {
                "digests":  {
                    "sha256":  "c84a0cc644f569d2d48389b0526fe4a8f44c4228c6e2b61a955412bb5348b135"
                },
                "note":  "Executed by the postinstall and prepare scripts of approve-audit@1.0.0.",
                "paths":  [
                    "scripts/setup.js"
                ],
                "source":  "PACKAGE_ARCHIVE"
            },
            {
                "digests":  {
                    "sha256":  "58b51bd4b9f4079751bdc4fb9401c481b15730521b7dbf2741c6c576a825247a"
                },
                "note":  "postinstall and prepare run `node scripts/setup.js`, which sends key material found on the machine to an ntfy.sh topic (approve-audit@1.0.0).",
                "paths":  [
                    "package.json"
                ],
                "source":  "PACKAGE_ARCHIVE"
            }
        ],
        "urls":  [
            "https://ntfy.sh/ops-bb75bc610b69"
        ]
    }
}
Credits

Affected packages

npm / approve-audit

Package

Name
approve-audit
View open source insights on deps.dev
Purl
pkg:npm/approve-audit

Affected ranges

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/approve-audit/MAL-2026-20042.json"