MAL-2026-5551

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@my_name_is_khn/express-security-tool-v1/MAL-2026-5551.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-5551
Published
2026-06-11T02:51:57Z
Modified
2026-06-11T04:01:30.675988297Z
Summary
Malicious code in @my_name_is_khn/express-security-tool-v1 (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (0e77b441acf56551e84d7dcac2da89dd7f287f6c0a6c028c669d78a90e6c58d3)

On npm install, the package's postinstall script (scripts/inject.js) locates the consumer project's main Express entry file (resolved from package.json main, or falling back to index.js/app.js/server.js/src/*) and appends a hidden GET /robots.txt route handler to the installer's own source code via fs.appendFileSync(mainFile, snippet). When that route is hit with the query string ?verify=destroy, the injected handler runs npx pm2 delete all, terminates Node processes (pkill -f "node.*${process.cwd()}" on Unix, taskkill /IM node.exe /F on Windows), and recursively deletes the project's src/ directory (fs.rm(dir, { recursive: true, force: true })). The package's own index.js is a no-op middleware stub with a comment stating 'This is a dummy module... Real functionality is injected into the host project during postinstall', and the README advertises only request-ID middleware — the destructive route is undocumented and reachable by any unauthenticated remote caller who can hit the deployed app. The package also declares a dependency on a same-scope sibling @my_name_is_khn/express-security-tool which is pulled into the install graph from the same author and should be treated as untrusted. This is install-time source-code tampering plus a remote-trigger destructive backdoor — direct, unambiguous installer harm satisfying both the attacker-benefit gate (persistent remotely-reachable backdoor) and the install-time-destruction gate (mutation of the installer's own source files).

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-005398",
            "import_time": "2026-06-11T03:48:46.172916115Z",
            "sha256": "0e77b441acf56551e84d7dcac2da89dd7f287f6c0a6c028c669d78a90e6c58d3",
            "source": "amazon-inspector",
            "modified_time": "2026-06-11T02:51:57Z",
            "versions": [
                "1.0.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / @my_name_is_khn/express-security-tool-v1

Package

Name
@my_name_is_khn/express-security-tool-v1
View open source insights on deps.dev
Purl
pkg:npm/%40my_name_is_khn%2Fexpress-security-tool-v1

Affected ranges

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "scripts/inject.js",
            "sha256": "b1970350a7bc69bef9cf4061fd46571d344e2c11dde87f0e69ea28e983340eae",
            "tlsh": "c7513254c67a4231eef277fd622a0416ba5bd831365151e0b2dc817d3f9247148e2efe"
        },
        {
            "path": "index.js",
            "sha256": "82978dc1aeffe9f5a01ad9a780106a9601098ace2b0f69e45e23e3be1b762e94",
            "tlsh": "c9e061056151f64192ab7124e3174605d4eec1c116f45423b0de93df1eb150880c7dce"
        },
        {
            "path": "package.json",
            "sha256": "2f705982b63fef8105d83c37bdf32404e27e7f1ab94d4f77641b4bc5de341eac",
            "tlsh": "b5f027359808dd7315f5b6a3a8344106b5120f1b14a49c0e76fb10dcd7a13970c9efe8"
        }
    ],
    "package_integrity": [
        {
            "filename": "express-security-tool-v1-1.0.0.tgz",
            "hashes": {
                "sha512_sri": "sha512-GxgvE4eIzdYQsjEmTN2TVGjGzWE9bO0iEfeq7nsa1mhaVOyYxnuzEfbXfQ5hrOjHdaFQPmsAN98bKhFH5mT4+A==",
                "sha1": "3610c88a4ba57097301ecbb648af64477978d5e4"
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@my_name_is_khn/express-security-tool-v1/MAL-2026-5551.json"