MAL-2026-16329

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-viem/MAL-2026-16329.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-16329
Published
2026-09-21T03:29:31Z
Modified
2026-09-21T04:00:06Z
Summary
Malicious code in chai-as-viem (npm)
Details

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

Source: amazon-inspector (397fee7b80d73ee4c82892a746b2bab33a4cd2f71ef1ec4fe6fbbaa0bb270308)

On require of the package, index.js loads lib/initializeCaller.js, which runs an IIFE at module load. The IIFE decodes a base64-concealed URL (resolving to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df), POSTs the full process.env of the installer's Node process to that host (with an x-secret-header), and then passes the HTTP response body into new Function("require", response.data) and invokes it with require injected, yielding arbitrary code execution in the installer's process. The package name and index.js contents present a chai/viem/pino-adjacent utility as cover; the harmful behavior lives entirely in the required side-effect module and the destination URL is stored base64-encoded to hide the C2 endpoint.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-020222",
            "import_time":  "2026-09-21T03:46:37.255716139Z",
            "modified_time":  "2026-09-21T03:29:31Z",
            "sha256":  "397fee7b80d73ee4c82892a746b2bab33a4cd2f71ef1ec4fe6fbbaa0bb270308",
            "source":  "amazon-inspector",
            "versions":  [
                "1.1.3"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / chai-as-viem

Package

Affected ranges

Affected versions

1.*
1.1.3

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/initializeCaller.js",
            "sha256":  "6ae47651f95735e18c7370aa04d1577ffbd19c20eed57729c777cac6d4a83f4b",
            "tlsh":  "9bf08b5d28ba203942ae64e2bf1b14561453f82232d5d865f7cc836a0f8dd4daaa36d8"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "chai-as-viem-1.1.3.tgz",
            "hashes":  {
                "sha1":  "b00d66ee2dd7d36c6f8048c0a378da9e4b46985d",
                "sha512_sri":  "sha512-uFgjDoLlgU1Hl8yejrhW3ruNstb1AtLC/Ln8W21w+LX8Dog6d7uBgkmTGRTXGsYBOxf1nkE0yEGpLhm/7WDoPg=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-viem/MAL-2026-16329.json"