MAL-2026-10050

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-defender/MAL-2026-10050.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-10050
Aliases
  • GHSA-hqh4-jccw-jxg6
Published
2026-07-09T15:29:51Z
Modified
2026-07-10T16:16:53.652978520Z
Summary
Malicious code in chai-defender (npm)
Details

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

Source: amazon-inspector (14f276305fd5e43b60bbfd1048d8792ef7f72734c28cfe533d368c0fc199a0fe)

On require('chai-defender'), index.js invokes launchDeflectBootstrap() which spawns a detached background node process running lib/caller.js. That process loads lib/initstate.js, which performs an HTTP GET against a hardcoded remote endpoint (http://check-server-state.vercel.app/server/v2) and passes the response body into new Function('require', <response>)(require), executing attacker-controlled JavaScript with access to Node's require in the installer's process. The package presents itself as a Chai assertions plugin ('Security-focused Chai assertions'), but this fetch-and-exec behavior is unrelated to any assertion functionality. The lib/ directory is padded with files whose names mimic the pino logger project (multistream.js, transport.js, redaction.js, levels.js, symbols.js, worker.js) and reference a non-existent./flowlimit.js module; these files are not wired into index.js and appear to exist to make the package look substantial while the real payload is lib/const.js + lib/initstate.js. Plain HTTP transport additionally exposes the eval channel to in-path payload injection. Any project that requires this package hands remote code execution to whoever controls check-server-state.vercel.app.

Source: ghsa-malware (75c7830506d0e9a312439be5f71e64bc9881c1fb19a5472489124b8e62ee48a3)

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": [
        {
            "versions": [
                "1.0.2"
            ],
            "id": "IN-MAL-2026-009112",
            "import_time": "2026-07-09T16:20:41.727214646Z",
            "sha256": "14f276305fd5e43b60bbfd1048d8792ef7f72734c28cfe533d368c0fc199a0fe",
            "modified_time": "2026-07-09T15:30:01Z",
            "source": "amazon-inspector"
        },
        {
            "sha256": "1fea9da4b149b2d4227fe03d74db2f07cc91a6fe818e53645540eea41b37bf35",
            "id": "IN-MAL-2026-009114",
            "import_time": "2026-07-09T16:20:41.955502102Z",
            "modified_time": "2026-07-09T15:30:17Z",
            "versions": [
                "1.0.0-beta.1"
            ],
            "source": "amazon-inspector"
        },
        {
            "sha256": "4e0972a703e67bb7bc79d419129a0282f21015b6ca14e4e129950801e1aa392b",
            "id": "IN-MAL-2026-009111",
            "import_time": "2026-07-09T16:20:41.67787246Z",
            "modified_time": "2026-07-09T15:29:51Z",
            "versions": [
                "1.0.1-beta"
            ],
            "source": "amazon-inspector"
        },
        {
            "sha256": "5830fd878c4ab10b095093a6596563d257d7af9779aa6247747b3804ee3a79f5",
            "id": "IN-MAL-2026-009115",
            "import_time": "2026-07-09T16:20:42.052636271Z",
            "modified_time": "2026-07-09T15:30:28Z",
            "versions": [
                "1.0.1"
            ],
            "source": "amazon-inspector"
        },
        {
            "sha256": "b3ed91a9065fe4f46b24038459cb3bbb21427289c79bb055100224a73375c049",
            "id": "IN-MAL-2026-009113",
            "import_time": "2026-07-09T16:20:41.840503583Z",
            "modified_time": "2026-07-09T15:30:09Z",
            "versions": [
                "1.1.0"
            ],
            "source": "amazon-inspector"
        },
        {
            "sha256": "13ee003a6b5448902efa0bcb6a860e60be5b05db2f45068e130b8fc3f5948366",
            "id": "IN-MAL-2026-009406",
            "import_time": "2026-07-09T22:02:28.022648576Z",
            "modified_time": "2026-07-09T21:26:33Z",
            "versions": [
                "1.1.1"
            ],
            "source": "amazon-inspector"
        },
        {
            "sha256": "75c7830506d0e9a312439be5f71e64bc9881c1fb19a5472489124b8e62ee48a3",
            "id": "GHSA-hqh4-jccw-jxg6",
            "import_time": "2026-07-10T16:03:11.121831328Z",
            "modified_time": "2026-07-10T15:53:41Z",
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "SEMVER"
                }
            ],
            "source": "ghsa-malware"
        }
    ]
}
References
Credits

Affected packages

npm / chai-defender

Package

Affected ranges

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

Affected versions

1.*
1.0.0-beta.1
1.0.1-beta
1.0.1
1.0.2
1.1.0
1.1.1

Database specific

indicators
{
    "evidence_files": [
        {
            "tlsh": "eed1e1a839e3a4188563b1f5157fa416e476a027202dd9d8f5ecc2d00fcdee88563deb",
            "sha256": "cd19c2dcc1977ba25d211973343b731e4b585a96246e911390340aff2af6fe29",
            "path": "index.js"
        },
        {
            "tlsh": "d411d0682cf1323902a2a4eed70b58153059e4133558d9943b8c42c25fad94d96b7fcd",
            "sha256": "4efa7e378b86f903db342960cc0d06ac9c09dd7213876651033e5952fc02b782",
            "path": "lib/initstate.js"
        },
        {
            "sha256": "bc2f17b38cbc4181ae4c63127d8532e369b08845e8a04a023278388f5817d908",
            "tlsh": "45017064cc3dad3305ea22a1446d4107a1659e078c58fc0d33e7412c8f9c9af50fea6e",
            "path": "package.json"
        },
        {
            "tlsh": "760222384da6ac9d33c2f0ac5aab12417154bc53f9165570f8acb610dfded3a2460efa",
            "sha256": "bf4225e24dd5d210efa61cc6a25284d5afe24c55720685e4e391d51268a8936e",
            "path": "lib/worker.js"
        }
    ],
    "package_integrity": [
        {
            "filename": "chai-defender-1.0.2.tgz",
            "hashes": {
                "sha512_sri": "sha512-i0Qo54tDmTdS3yhMpn0mmJCzCEFBl1YoYTp9VIMHTIkjhAYwl8Dh4BmPC662IoDqm3nv701S7PFpTztLIXoFbA==",
                "sha1": "b1349d681bd2822e4aa66d4cbf2a16c50191b6ec"
            }
        }
    ]
}
cwes
[
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "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."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "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."
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-defender/MAL-2026-10050.json"