MAL-2026-5908

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chain-chai-test/MAL-2026-5908.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-5908
Aliases
  • GHSA-6626-c428-r9qf
Published
2026-06-16T16:22:52Z
Modified
2026-07-23T07:51:10Z
Summary
Malicious code in chain-chai-test (npm)
Details

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

Source: amazon-inspector (4287ff6637bb0d3109dcdc3082aece79d69deca2a3580ebf850ec1c13e8a3e00)

chain-chai-test@1.3.5 advertises itself as a pino-style logger (keywords fast/logger/stream/json, exported alias module.exports.pino = middleware, pino-pretty visual assets) but the exported middleware factory spawns a detached node lib/caller.js process. caller.js performs axios.get against https://jsonkeeper.com/b/EXSIF (with a base64-obfuscated sibling URL https://jsonkeeper.com/b/ZK45J in lib/const.js, decoded from aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iL1pLNDVK), reads .data.cookie from the response, and passes that string to new Function.constructor("require", s) invoked with the host process's require. That executes attacker-controlled JavaScript with full Node.js privileges in the consuming application. The fetch destination is an anonymous, mutable JSON-paste host, the URL is duplicated in obfuscated form to conceal the C2 endpoint, and the package name and exported API impersonate the legitimate pino logger to lure installers. Unrelated dependencies (request, sqlite3, parse-json) further indicate this is not a logger implementation.

Source: ghsa-malware (763b4853da8c66a8801a7e33d815b99195a72b2343cc4d70a54b9eaa44108e90)

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-006795",
            "import_time": "2026-06-16T18:10:20.723525968Z",
            "modified_time": "2026-06-16T16:22:52Z",
            "sha256": "4287ff6637bb0d3109dcdc3082aece79d69deca2a3580ebf850ec1c13e8a3e00",
            "source": "amazon-inspector",
            "versions": [
                "1.3.5"
            ]
        },
        {
            "id": "GHSA-6626-c428-r9qf",
            "import_time": "2026-06-29T17:14:01.248298381Z",
            "modified_time": "2026-06-29T16:32:54Z",
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "SEMVER"
                }
            ],
            "sha256": "763b4853da8c66a8801a7e33d815b99195a72b2343cc4d70a54b9eaa44108e90",
            "source": "ghsa-malware"
        },
        {
            "id": "RLMA-2026-05015",
            "import_time": "2026-07-09T09:16:24.29217791Z",
            "modified_time": "2026-07-07T12:43:52Z",
            "sha256": "bd0b61ba64898f5157c2315686f6e5bf012fac57dedc32f78f63a9c9ede4ab39",
            "source": "reversing-labs",
            "versions": [
                "1.3.5"
            ]
        },
        {
            "id": "GHSA-6626-c428-r9qf",
            "import_time": "2026-07-10T16:54:13.225525412Z",
            "modified_time": "2026-07-10T16:06:47Z",
            "sha256": "50088d1606d597fc9b87776afd29491b621fd071959acc23e82fe7e94269f185",
            "source": "ghsa-malware",
            "versions": [
                "1.3.5"
            ]
        },
        {
            "id": "RLUA-2026-05514",
            "import_time": "2026-07-20T13:15:01.160155468Z",
            "modified_time": "2026-07-20T10:37:09Z",
            "sha256": "a667639062ba51a913e5c6f9f9ad88a0be84b76c0168ea8e534c818bd88f3f7d",
            "source": "reversing-labs"
        }
    ]
}
References
Credits

Affected packages

npm / chain-chai-test

Package

Name
chain-chai-test
View open source insights on deps.dev
Purl
pkg:npm/chain-chai-test

Affected ranges

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

Affected versions

1.*
1.3.5

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"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "lib/caller.js",
            "sha256": "c94c68398967a72596733d62b40d3b2df9490056a3b25bfd96333d0a88d84624",
            "tlsh": "e701cb8f30fd101c019122e66b1fe4327010e85b390ae4d4374c87521ffa5aeaa53ede"
        },
        {
            "path": "index.js",
            "sha256": "32e82853dd646aac388b78f868241267a5e6483d847df3d4c843f8100590d469",
            "tlsh": "30213f8175f111480658d9c8b569e5363ce3c4377207b9b0e9ecb7862bcf20c0272ad7"
        },
        {
            "path": "lib/const.js",
            "sha256": "9879ffb0bf61edef7e9b90ddc5fac9770c514c0cdecd9a07b15e8a677e6f8f74",
            "tlsh": "8ac08c8351e4a89704301773610ca995f2a1d26f0c840b0331f594844a396a93840fbb"
        }
    ],
    "package_integrity": [
        {
            "filename": "chain-chai-test-1.3.5.tgz",
            "hashes": {
                "sha1": "4add4668a7eec67f97f4bce6b82988f158d9b89e",
                "sha512_sri": "sha512-jF7BMCPtFtNBlP/Fe7IJlgrMUhvAD5uL85XnTskMXBD+gBIGwM9o47yiR6z5oZ0ElEBWU4PQw4dKlAnXK0hmog=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chain-chai-test/MAL-2026-5908.json"