MAL-2026-14200

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-gateway/MAL-2026-14200.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-14200
Published
2026-08-19T01:59:46Z
Modified
2026-08-19T02:45:11Z
Summary
Malicious code in chai-as-gateway (npm)
Details

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

Source: amazon-inspector (f90afdde9240783f1f869b875b7967490cf579e1bae0986861498f8c98c0d973)

The package advertises itself as a logger (README and type definitions copied wholesale from pinojs/pino) but its exported middleware is a no-op that simply calls next(). index.js unconditionally executes require('./lib/config') at module top level, and lib/config.js is a ~4MB obfuscator.io-style blob (string-array rotate loader, ~24k entries, hex-escaped identifiers) whose only purpose is to run on import. The obfuscated blob contains references to child_process exec/spawn, axios (declared as a runtime dependency in package.json), fs directory traversal via withFileTypes, the path fragment.aws, and the full base64 alphabet — the standard shape of an installer-secret harvester that walks the home directory for AWS credentials and exfiltrates over HTTP. The package name resembles unrelated popular packages, the description string ('vulnerabilities management document') does not match the pino-cloned documentation, and author metadata is a generic hello@jsonspack.com address. Requiring this package auto-executes attacker-controlled code on the installer.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-018289",
            "import_time": "2026-08-19T02:31:08.598969158Z",
            "modified_time": "2026-08-19T01:59:46Z",
            "sha256": "f90afdde9240783f1f869b875b7967490cf579e1bae0986861498f8c98c0d973",
            "source": "amazon-inspector",
            "versions": [
                "7.1.5"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / chai-as-gateway

Package

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

Affected ranges

Affected versions

7.*
7.1.5

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "lib/config.js",
            "sha256": "8397643af68793d57aec3637e79324e9183d6f1168009cd0676432515e88c515",
            "tlsh": "261652d88984d123d3de9b13fe14a9a8f1fa79a6d4cce40b86987d4d29fc847d4a0cd4"
        },
        {
            "path": "package.json",
            "sha256": "8a252b1e5ea35464e9dc2c2d67420bac2b432b911adf07a5d16b7cb0f911fa23",
            "tlsh": "ca017b20de784e6304ed25525c2a064376614c175528fd1932db612c4f9d5ff01bf21d"
        }
    ],
    "package_integrity": [
        {
            "filename": "chai-as-gateway-7.1.5.tgz",
            "hashes": {
                "sha1": "28424b4019235b241f14f9760c8f48413437ce3d",
                "sha512_sri": "sha512-x3Dh6gMstuo6X6s1SI9FkWeaCvbEC1k4+TSIpidmtbM9Sl8TwAOdZ+bAZ6JqjWlFIxNtzuN1L0cLy5CSIWgdOQ=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-gateway/MAL-2026-14200.json"