MAL-2026-13627

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@nestjs-passport/jwt/MAL-2026-13627.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-13627
Published
2026-08-07T18:02:58Z
Modified
2026-08-07T18:35:11.534492286Z
Summary
Malicious code in @nestjs-passport/jwt (npm)
Details

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

Source: amazon-inspector (0d3060c9289c475e223c1c00bc21a0f59f8aa5b18e31bfaee6e4d923eab0042f)

Package published under the @nestjs-passport scope, which resembles the official @nestjs/jwt and @nestjs/passport packages. The sole entrypoint files dist/index.cjs and dist/index.js each consist of a single-line JSFuck-encoded string (~2.3MB of permutations of!+[],!![], +[]) that is passed to new Function('jose', <opaque body>) and invoked at require/import time, executing hidden code in the installer's Node process every time the module is loaded. The advertised purpose is a minimal HS256 JWT helper — a task requiring only a few lines of jose calls — and the shipped TypeScript declarations expose obfuscated private field names such as _0x5f2e and _0x4b19, inconsistent with the declared tsup build tooling. The combination of scope-level typosquat, whole-module JSFuck obfuscation, and dynamic evaluation of the obfuscated body at import time is a concealment-and-execution vehicle: whatever behavior the payload performs runs inside the installer's process without any traced-readable code path.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-017136",
            "import_time": "2026-08-07T18:23:03.462193119Z",
            "sha256": "0d3060c9289c475e223c1c00bc21a0f59f8aa5b18e31bfaee6e4d923eab0042f",
            "modified_time": "2026-08-07T18:03:10Z",
            "versions": [
                "1.0.7"
            ],
            "source": "amazon-inspector"
        },
        {
            "id": "IN-MAL-2026-017135",
            "import_time": "2026-08-07T18:23:03.426426772Z",
            "sha256": "3118e2d469f173e01de26e12dca51e96b8c8e2a9c0d90d1476c3472d08f82193",
            "modified_time": "2026-08-07T18:02:58Z",
            "versions": [
                "1.0.4"
            ],
            "source": "amazon-inspector"
        }
    ]
}
References
Credits

Affected packages

npm / @nestjs-passport/jwt

Package

Name
@nestjs-passport/jwt
View open source insights on deps.dev
Purl
pkg:npm/%40nestjs-passport/jwt

Affected ranges

Affected versions

1.*
1.0.4
1.0.7

Database specific

cwes
[
    {
        "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"
    }
]
indicators
{
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-YbhPO2poNrFbEK0mWPHWiCsSYkf3Ys8Wr0dAQkx3qsMXq5i5Kr6yx2fulyJpgsPgY7fuY/BewNZSovHXie2lYg==",
                "sha1": "848c0e11f4d19efe132d6eb356d8121202affc98"
            },
            "filename": "jwt-1.0.7.tgz"
        }
    ],
    "evidence_files": [
        {
            "path": "dist/index.cjs",
            "sha256": "a2b64d639ffaaa3784eaf995d0ed16242280c47a4647fcd34e686dcf04769be6",
            "tlsh": "a3b51c0ec013e7d5f9cb55ec3ce4ae9d9b0e1e0bbaa4c76c2b4ca6974759ef06484811"
        },
        {
            "path": "dist/index.d.ts",
            "sha256": "65b212dab6b4946e63c2b0e76c1bf56558fad64f648d0eaed8c7ef11117e9b08",
            "tlsh": "67f08141d8d607701c938653afda0dc6e89cf20a654cbdf9ffe280514ac340ad07156a"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@nestjs-passport/jwt/MAL-2026-13627.json"