MAL-2026-18454

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/calculator-preinstall-hook-demo/MAL-2026-18454.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-18454
Published
2026-11-01T00:40:05Z
Modified
2026-11-02T06:00:06Z
Summary
Malicious code in calculator-preinstall-hook-demo (npm)
Details

calculator-preinstall-hook-demo@1.1.2 presents itself as a test fixture for npm lifecycle hooks. Its preinstall script runs node preinstall.js on npm install, which POSTs the machine's hostname and the OS username to the Discord webhook https://discord.com/api/webhooks/1566215853794394162/xsqpEbSn-cc3DU2AKWdzqWnXX5hjTfV-gUePQZ4evrHGlZctMd40TKCrN42qnJd7moc1. It was published by the npm account bigdevin55 together with calculator-preinstall-chain-demo@1.1.2, which pulls it in as a dependency.

Database specific
{
    "iocs":  {
        "files":  [
            {
                "digests":  {
                    "sha256":  "9263944547c2bef40d6bc1c04578f6120c95965c138f965aa57391e663183e5f"
                },
                "note":  "preinstall runs `node preinstall.js`, which POSTs hostname and username to a Discord webhook (calculator-preinstall-hook-demo@1.1.2).",
                "paths":  [
                    "package.json"
                ],
                "source":  "PACKAGE_ARCHIVE"
            },
            {
                "digests":  {
                    "sha256":  "e8616aa03681bfd603d5b4767c2f9ccb45ff8e90956102a7105fde7dbc5969a3"
                },
                "note":  "Executed by the preinstall script of calculator-preinstall-hook-demo@1.1.2.",
                "paths":  [
                    "preinstall.js"
                ],
                "source":  "PACKAGE_ARCHIVE"
            }
        ],
        "urls":  [
            "https://discord.com/api/webhooks/1566215853794394162/xsqpEbSn-cc3DU2AKWdzqWnXX5hjTfV-gUePQZ4evrHGlZctMd40TKCrN42qnJd7moc1"
        ]
    }
}
References
Credits

Affected packages

npm / calculator-preinstall-hook-demo

Package

Name
calculator-preinstall-hook-demo
View open source insights on deps.dev
Purl
pkg:npm/calculator-preinstall-hook-demo

Affected ranges

Affected versions

1.*
1.1.2

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/calculator-preinstall-hook-demo/MAL-2026-18454.json"