MAL-2026-14371

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-testkit/MAL-2026-14371.json
JSON Data
https://api.test.osv.dev/v1/vulns/MAL-2026-14371
Published
2026-08-23T03:14:40Z
Modified
2026-08-23T03:30:18.842445601Z
Summary
Malicious code in chai-as-testkit (npm)
Details

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

Source: amazon-inspector (0bf8ab4a811449bd1ba40c637a0eebc0569994d3a3550cf7156c36192abcec31)

The package is published as 'chai-as-testkit' with a description referencing vulnerability management, but the tarball ships pino's README, docs/, index.d.ts, and lib/ tree (proto, levels, transport, worker, redaction) under an unrelated author (Robert King hello@jsonspack.com, bugs.url jsonspack.com) rather than the real pinojs publisher. The shipped index.js is a synthetic stub whose only effect is const config = require('./lib/config'), and lib/config.js is a 4,083,409-byte single-line obfuscator.io-style bundle: a rotated hex-escaped string array of ~23,953 entries with control-flow flattening and dead-code layers (webcrack inlines 40,105 decoded strings across the decoder layers before failing to serialize). This blob runs immediately when any consumer imports the package, executing attacker-controlled code inside the developer or CI Node.js process. The pino impersonation is the social-engineering wrapper around an on-import loader; the shape (name/description/author mismatch + hollow main entry that delegates to a multi-megabyte obfuscated module at require time) is a typosquat-delivered install/import-time RCE vehicle rather than a logging library.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-018569",
            "sha256": "0bf8ab4a811449bd1ba40c637a0eebc0569994d3a3550cf7156c36192abcec31",
            "modified_time": "2026-08-23T03:14:40Z",
            "versions": [
                "2.3.5"
            ],
            "import_time": "2026-08-23T03:25:56.212228176Z",
            "source": "amazon-inspector"
        }
    ]
}
References
Credits

Affected packages

npm / chai-as-testkit

Package

Affected ranges

Affected versions

2.*
2.3.5

Database specific

indicators
{
    "evidence_files": [
        {
            "sha256": "ef7a5abedd9be15b8f63cd56aca72913f2858678bcd4148b96030b304e7ca5e4",
            "path": "lib/config.js",
            "tlsh": "861672889581c43395ce16a3ff2d6ae8f13a79f1c4c8a54bc569bc9c2dac91fd1a0dd0"
        },
        {
            "sha256": "9d9df1481c920ec1d01c8cead724dd2ed789c26a411fabee68cd33a6f4414219",
            "path": "package.json",
            "tlsh": "51017b20debc4e2301ed25524c2a0643ba614c175628fd1932db512d0f9d5ff41bf21d"
        }
    ],
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-cBCciGdISfMyeKC4gwgCu2c9ciADdt+vwq/Wz56V9rL2Tnvx5Q2FNWk7jDLhGLGMxAdd6d+h3sRtqOMfBr9ghg==",
                "sha1": "3fde83408d21f4123e9127ed9dc0aaaf1f603dff"
            },
            "filename": "chai-as-testkit-2.3.5.tgz"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-testkit/MAL-2026-14371.json"
cwes
[
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    }
]