MAL-2026-10440

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/type-context/MAL-2026-10440.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-10440
Aliases
  • GHSA-rw86-h32r-9xf5
Published
2026-07-13T09:21:55Z
Modified
2026-07-13T19:01:56.704717505Z
Summary
Malicious code in type-context (npm)
Details

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

Source: amazon-inspector (5c6706d0ad662da8d23eaf47c64780a777f3ec215d8864caf1e0962289463efb)

The package presents itself as a logger (module.exports.pino, keywords fast/logger/stream/json, pino-like sibling files proto.js/multistream.js/transport.js/redaction.js) despite being named type-context. When a consumer imports the package and invokes its middleware factory, lib/caller.js is executed as a detached Node child process. That script fetches JSON from a hardcoded remote endpoint (https://jsonhosting.com/api/json/fb84ebf4/raw), extracts a 'cookie' field from the response, and passes the value to new Function.constructor('require', s)(require), executing attacker-controlled JavaScript with the real Node require injected — full module-loader privileges on the host. Fallback destinations are base64-encoded in a shadowed local process.env object labeled DEVAPIKEY, decoding to jsonkeeper.com paste URLs (https://jsonkeeper.com/b/XRGF3, https://jsonkeeper.com/b/4NAKK); this obfuscation of network destinations paired with the dynamic-code sink shows intent to evade casual review. The remote body is mutable and hosted on anonymous paste-style infrastructure, so any code the attacker chooses is executed on the installer/host.

Source: ghsa-malware (e5a69151637bc251e0fa96b452db0d8e78c4e972dc232ad91fe7f94c7b655688)

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": [
        {
            "source": "amazon-inspector",
            "sha256": "4ae7ddd2b49c21ea43d1b73e1365fbfe2fe1727cf1f27972db46961c17a47621",
            "modified_time": "2026-07-13T09:22:20Z",
            "import_time": "2026-07-13T10:37:37.695033359Z",
            "id": "IN-MAL-2026-010206",
            "versions": [
                "3.2.7"
            ]
        },
        {
            "source": "amazon-inspector",
            "sha256": "6e4db69b627def6f11a74d5948b91006a46a3c73d90081be6f19716133cfaafb",
            "id": "IN-MAL-2026-010203",
            "import_time": "2026-07-13T10:37:37.42541359Z",
            "modified_time": "2026-07-13T09:21:55Z",
            "versions": [
                "3.2.8"
            ]
        },
        {
            "source": "amazon-inspector",
            "sha256": "c4f89dddd247cd465adc522b86a44066429dae0f2d7ac8b11871d92ba15d2850",
            "modified_time": "2026-07-13T14:23:08Z",
            "import_time": "2026-07-13T15:30:31.736435435Z",
            "id": "IN-MAL-2026-010264",
            "versions": [
                "3.2.9"
            ]
        },
        {
            "source": "amazon-inspector",
            "sha256": "5c6706d0ad662da8d23eaf47c64780a777f3ec215d8864caf1e0962289463efb",
            "modified_time": "2026-07-13T17:53:46Z",
            "import_time": "2026-07-13T18:10:13.116471465Z",
            "id": "IN-MAL-2026-010280",
            "versions": [
                "3.2.11"
            ]
        },
        {
            "source": "ghsa-malware",
            "sha256": "e5a69151637bc251e0fa96b452db0d8e78c4e972dc232ad91fe7f94c7b655688",
            "ranges": [
                {
                    "type": "SEMVER",
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ]
                }
            ],
            "import_time": "2026-07-13T18:49:49.021270003Z",
            "id": "GHSA-rw86-h32r-9xf5",
            "modified_time": "2026-07-13T17:53:07Z"
        }
    ]
}
References
Credits

Affected packages

npm / type-context

Package

Affected ranges

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

Affected versions

3.*
3.2.7
3.2.8
3.2.9
3.2.11

Database specific

source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/type-context/MAL-2026-10440.json"
cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506",
        "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
{
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-1G76LvYR+7C9VLtO2XSZbeHVdvQW6bwOZKsXZrd1eCYAAi9PbXlpQCciN5Kx26nDQMCwJbDadhIT1DYntWY0EA==",
                "sha1": "a56b6837921fe7124993a27e22d169ee844d3203"
            },
            "filename": "type-context-3.2.7.tgz"
        }
    ],
    "evidence_files": [
        {
            "path": "lib/caller.js",
            "sha256": "99571c942ae0f86195f34f81c92a71e461e09504d714b71fda27075b4cfd5dfb",
            "tlsh": "79017b8a30fa605c055514f64b1fb0327012e4173c49ead53b9c83514fea9ae6963afd"
        },
        {
            "path": "package.json",
            "sha256": "2813f136e64d98877fb865b05be66f1cfaf60bb3c22ab422d1997ce7fe1f9070",
            "tlsh": "be019c21de788e2301ed25824c2a0643b6319c075828fc2932db512c0f9e4bf01ff25e"
        }
    ]
}