MAL-2026-17507

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-jsx/MAL-2026-17507.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-17507
Published
2026-10-04T23:28:05Z
Modified
2026-10-04T23:45:20Z
Summary
Malicious code in hardhat-jsx (npm)
Details

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

Source: amazon-inspector (62ac44be2745338b73861690e7f979216fdfc6c3797dfa2f450e9063aa4158d1)

The package is published as 'hardhat-jsx' but its metadata, documentation, and lib/ layout impersonate the pino logger (keywords 'fast','logger','stream','json'; shipped docs reference pinojs/pino). The main entry index.js unconditionally requires./lib/config, which is a 4,499,968-byte single-line obfuscator.io artifact — a hex-escaped string array of ~26,234 entries with string-array rotation and control-flow flattening (22,707 decoder-wrapper inlines, 44,499 string-inline changes). A legitimate pino 'config' module is ~1-2KB; a multi-megabyte obfuscated blob auto-loaded by the main entry is a loader/dropper. The surface index.js exports a no-op Express-style middleware whose comment claims it 'triggers a background process', providing a cover story adjacent to the obfuscated require. Loading the package via require/import executes the opaque payload in the installer's process. The name/content mismatch (hardhat-jsx vs. pino impersonation), the stub façade, and the heavily obfuscated auto-loaded module together form a trojan-package shape.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-020971",
            "import_time":  "2026-10-04T23:40:47.128073047Z",
            "modified_time":  "2026-10-04T23:28:05Z",
            "sha256":  "62ac44be2745338b73861690e7f979216fdfc6c3797dfa2f450e9063aa4158d1",
            "source":  "amazon-inspector",
            "versions":  [
                "2.0.1"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / hardhat-jsx

Package

Affected ranges

Affected versions

2.*
2.0.1

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":  "b01c59ae0a76527503799aab109bd701e34f260d192722a8cf12c97a4e6d208c",
            "tlsh":  "61265f889244e03796cf1ac3bf0529ede57aa861e4cca30797d4be5cb9ac40bd4b5dd0"
        },
        {
            "path":  "package.json",
            "sha256":  "33a629df960cc3d188fe59c447f0a0e513f60ccfd076e3983e5de7f146ac657b",
            "tlsh":  "85017620deb88e2305ed25424c2a0603b6a58c175528fc2933dba12c0fad5fb41bf22e"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "hardhat-jsx-2.0.1.tgz",
            "hashes":  {
                "sha1":  "4ab772462eddc1c7ee8a457b784a42832668bb45",
                "sha512_sri":  "sha512-fYiJRq59JqLLeRKMwlg5wU3vRNoyj6v4F1spmFsXQ9K930JvqF21ZHSmbGyiKJ2pBgKXVrDzmrpEyiHX4mRCGA=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hardhat-jsx/MAL-2026-17507.json"