MAL-2026-6717

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/test-pkg-x0/MAL-2026-6717.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6717
Aliases
  • GHSA-45jm-p8g6-hcxf
Published
2026-07-01T20:46:56Z
Modified
2026-08-20T01:15:15Z
Summary
Malicious code in test-pkg-x0 (npm)
Details

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

Source: amazon-inspector (0d0014944456f668a25fa484bf7cb5f36a7128d6a585b86d9294d8d49b23049a)

Package declares scripts.postinstall pointing at shim.js, a script that runs unconditionally on npm install. shim.js branches on uname -s (Darwin/MINGW/Linux) and executes OS-native commands on the installer's machine, including launching the Calculator application and opening https://github.com/X3r0Day/BunnyHijack in the installer's default browser via open / cmd /c start / xdg-open. Additionally, package.json registers a bin entry named node mapped to shim.js. Under package managers that resolve node from node_modules/.bin (notably bun), any dependency postinstall that invokes node will execute this shim instead of the real Node.js runtime; the declared dependency protoc-gen-grpc-web is used as the trigger. The combined effect is arbitrary command execution on the installer at install time, both directly via the package's own postinstall and indirectly by hijacking the node command for sibling dependencies' install scripts. The Calculator launch and browser navigation are a proof-of-concept payload; the underlying execution primitive is fully attacker-controlled.

Source: ghsa-malware (a531adc8e4d94d6d6f461ae142f94f333dfd5071515b75144cef218d812d6dde)

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-007896",
            "import_time": "2026-07-01T21:04:20.716755235Z",
            "modified_time": "2026-07-01T20:47:44Z",
            "sha256": "0d0014944456f668a25fa484bf7cb5f36a7128d6a585b86d9294d8d49b23049a",
            "source": "amazon-inspector",
            "versions": [
                "1.0.4"
            ]
        },
        {
            "id": "IN-MAL-2026-007895",
            "import_time": "2026-07-01T21:04:20.676561525Z",
            "modified_time": "2026-07-01T20:47:34Z",
            "sha256": "a85b5bbf9139048d1a42a81b40abceadeed726418faace65479f33ae2c94271f",
            "source": "amazon-inspector",
            "versions": [
                "1.0.3"
            ]
        },
        {
            "id": "IN-MAL-2026-007890",
            "import_time": "2026-07-01T21:04:20.297337581Z",
            "modified_time": "2026-07-01T20:46:56Z",
            "sha256": "aeb1efbab7d02351ac1c9de44053ede94268a1c1c361496326bad0cc265f1baa",
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ]
        },
        {
            "id": "IN-MAL-2026-007891",
            "import_time": "2026-07-01T21:04:20.358771887Z",
            "modified_time": "2026-07-01T20:47:04Z",
            "sha256": "c3594b48100f7bbaa17f7c16e4fe5b5098841972586311992715bf33d66ed638",
            "source": "amazon-inspector",
            "versions": [
                "1.0.2"
            ]
        },
        {
            "id": "IN-MAL-2026-007892",
            "import_time": "2026-07-01T21:04:20.441482702Z",
            "modified_time": "2026-07-01T20:47:12Z",
            "sha256": "e144deafee87e34e9d4777f9c78934cb1547e4a6dee22cc08a6ecfa560942c85",
            "source": "amazon-inspector",
            "versions": [
                "1.0.1"
            ]
        },
        {
            "id": "GHSA-45jm-p8g6-hcxf",
            "import_time": "2026-08-20T01:06:54.049178875Z",
            "modified_time": "2026-08-19T15:20:04Z",
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "SEMVER"
                }
            ],
            "sha256": "a531adc8e4d94d6d6f461ae142f94f333dfd5071515b75144cef218d812d6dde",
            "source": "ghsa-malware"
        }
    ]
}
References
Credits

Affected packages

npm / test-pkg-x0

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.0.0
1.0.1
1.0.2
1.0.3
1.0.4

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "shim.js",
            "sha256": "f9849ea2c8b097251e088a50c519eabaf85a81022b73712da40817773dba2914",
            "tlsh": "13f0dda7ac6153612f0f16ac374b546e9c9513674054fca823a3c743ef4613e59c14b2"
        },
        {
            "path": "package.json",
            "sha256": "f7f409f00cf69edb97f12cf5616374dc4079fc69d7d1dc579702c5fe34941bb7",
            "tlsh": "9dd0a7508ce246b324cd39a06c29640353295e1750083c2c61d3104cdb4e6bf047ab68"
        }
    ],
    "package_integrity": [
        {
            "filename": "test-pkg-x0-1.0.4.tgz",
            "hashes": {
                "sha1": "8086bfba46af24962e78b30389f4595cb62a0d83",
                "sha512_sri": "sha512-PjvQrzRwn/dINQx3Q6FJ/WfpDDHupftNfBad5+9o+sN6n8BLcg7sd/IH0I7vY/WXsMq/zClDe8W0T+TicXa2Og=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/test-pkg-x0/MAL-2026-6717.json"