MAL-2026-10939

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-reddit/MAL-2026-10939.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-10939
Aliases
  • GHSA-vc32-h28h-pmhm
Published
2026-07-21T00:39:41Z
Modified
2026-09-01T11:30:57Z
Summary
Malicious code in chai-as-reddit (npm)
Details

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

Source: amazon-inspector (8eff17b9d2536e662413c5c7090a1611f8c2813033a03960f9d979f23f2f72e7)

The npm package chai-as-reddit@7.0.4 is a trojaned distribution. Its published metadata and README describe a Chai plugin for Reddit API assertions, but the shipped tree (lib/, docs/, docsify/, SECURITY.md, LICENSE, index.d.ts) is copied from the unrelated Pino logger project as camouflage. The real entry point index.js is an unrelated Express-style middleware factory that additionally runs require('./lib/config') at top level. lib/config.js is a ~4 MB heavily obfuscated JavaScript file using obfuscator.io-style transformations (hex-string identifiers, a ~23,890-entry rotating string array, control-flow flattening, encoded number/string wrappers), and it does not exist in genuine Pino. Because index.js loads it at module top level, the opaque payload executes in the installer's Node.js process on any require or import of the package, before any exported API is invoked. The combination of a cover-story package name and README, camouflage sourced from an unrelated project, and an auto-executed obfuscated blob is characteristic of a supply-chain execution payload.

Source: ghsa-malware (2001f9e400a8a00d732bdcdfc5b0744420a7595ec39311cda805ca53fce035ad)

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": "GHSA-vc32-h28h-pmhm",
            "import_time": "2026-07-21T00:54:05.912575452Z",
            "modified_time": "2026-07-21T00:39:42Z",
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "SEMVER"
                }
            ],
            "sha256": "2001f9e400a8a00d732bdcdfc5b0744420a7595ec39311cda805ca53fce035ad",
            "source": "ghsa-malware"
        },
        {
            "id": "IN-MAL-2026-011189",
            "import_time": "2026-08-04T22:30:04.007039755Z",
            "modified_time": "2026-08-04T21:45:19Z",
            "sha256": "2fb4f309fca626e0e4b2fe5d9e8cdd8c9e07631cbcd718673f027bdad4169bd6",
            "source": "amazon-inspector",
            "versions": [
                "7.0.2"
            ]
        },
        {
            "id": "IN-MAL-2026-011184",
            "import_time": "2026-08-04T22:30:03.76970849Z",
            "modified_time": "2026-08-04T21:44:39Z",
            "sha256": "8eff17b9d2536e662413c5c7090a1611f8c2813033a03960f9d979f23f2f72e7",
            "source": "amazon-inspector",
            "versions": [
                "7.0.4"
            ]
        },
        {
            "id": "IN-MAL-2026-011226",
            "import_time": "2026-08-04T22:30:06.000468715Z",
            "modified_time": "2026-08-04T21:50:32Z",
            "sha256": "c19f2f9105d7998f27d13f9473dc98d895d0c9ba99084e5e42f94a559435906f",
            "source": "amazon-inspector",
            "versions": [
                "7.0.3"
            ]
        },
        {
            "id": "RLMA-2026-06124",
            "import_time": "2026-09-01T11:17:28.078381297Z",
            "modified_time": "2026-08-24T16:43:30Z",
            "sha256": "adc82b96bc31d519e665aa5394811f4e48f6bdcf5cc9ad017f2eea672f70ecc3",
            "source": "reversing-labs",
            "versions": [
                "7.0.2",
                "7.0.3"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / chai-as-reddit

Package

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

Affected ranges

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

Affected versions

7.*
7.0.2
7.0.3
7.0.4

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"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "index.js",
            "sha256": "24a3ce33886e8c8b5728e9ec619647bbc4b29193b271ad5eb3d90a5be5a712a7",
            "tlsh": "1e1123a168c650ce9834cad0b6306416bcdbc737320722b3b9fc57c927860081521fba"
        },
        {
            "path": "lib/config.js",
            "sha256": "1e3f9c43442ed0d25dcaa88833a12cf68ab3865c55031308fe4b5e8ec29c3a92",
            "tlsh": "70f5b8487971e03783dd1767be4a1fece63a186694c8a52b8558bd9f39bc107c1a3ce0"
        },
        {
            "path": "package.json",
            "sha256": "9c4b08050cf1cbd19145f92006ab140bd247ffdb4f2f6d33f5b89866aaa88f2a",
            "tlsh": "7e110462c8355da30ae82590586a050ab2218a578d18bd1d73f3902d6f9d96f21bfd4d"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-reddit/MAL-2026-10939.json"