MAL-2026-4592

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/jsontoken-extend/MAL-2026-4592.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-4592
Aliases
  • GHSA-v985-2jx7-c35g
Published
2026-05-25T15:26:07Z
Modified
2026-07-09T09:32:49.511089213Z
Summary
Malicious code in jsontoken-extend (npm)
Details

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

Source: amazon-inspector (59a8a8ab722d33bdd2ea25422aaf7e607a1b1a881446c3561ec8225fb9187742)

On require()/import of jsontoken-extend, sign.js executes a top-level IIFE that base64-decodes a hardcoded string to https://www.jsonkeeper.com/b/XAMRK, fetches the JSON body, and passes data.content directly to eval(). jsonkeeper.com is an anonymous, mutable paste service — the author can change the executed payload at any time without republishing the package, giving arbitrary remote code execution on every consumer at import time. A second base64-encoded URL (https://www.jsonkeeper.com/b/W80UP) is staged but commented out, indicating multiple prepared payloads. The package name and public API (sign/verify/decode plus JsonWebTokenError/NotBeforeError/TokenExpiredError) mirror the popular jsonwebtoken library exactly, and it even declares jsonwebtoken as a dependency to pass through legitimate-looking calls — a typosquat lure to attract developers searching for the real JWT library. Base64-wrapping the C2 URLs is a deliberate static-analysis evasion. Three independent block signals are present: import-time fetch+eval from an anonymous mutable host, typosquat naming/API mirroring with malicious payload, and obfuscated C2 URL constants.

Source: ghsa-malware (f4197bc2551778a0c0d93263900f2915b4feb64a81c6ff3530b69df4734efae0)

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": [
        {
            "modified_time": "2026-05-25T15:58:04Z",
            "sha256": "166f0f03fe28af87dca30356e92bd090fdf203f729aa761976487a818212e830",
            "versions": [
                "1.0.12"
            ],
            "import_time": "2026-05-26T05:53:08.670729079Z",
            "source": "amazon-inspector",
            "id": "IN-MAL-2026-004715"
        },
        {
            "modified_time": "2026-05-25T15:58:18Z",
            "sha256": "8907906fb6b1164ec1dc6d4ddf86f76c0ddbe872cae57a5655b72450b08049dc",
            "versions": [
                "1.0.12"
            ],
            "import_time": "2026-05-26T05:53:08.789544431Z",
            "source": "amazon-inspector",
            "id": "IN-MAL-2026-004716"
        },
        {
            "versions": [
                "1.0.11"
            ],
            "sha256": "a6ee9c49ff4f24ff70f0f61fd7de9e1a73b10b57f3bbafe4fda47cb01cf92ebf",
            "import_time": "2026-05-26T05:53:06.819413501Z",
            "modified_time": "2026-05-25T15:26:12Z",
            "source": "amazon-inspector",
            "id": "IN-MAL-2026-004700"
        },
        {
            "source": "amazon-inspector",
            "sha256": "59a8a8ab722d33bdd2ea25422aaf7e607a1b1a881446c3561ec8225fb9187742",
            "import_time": "2026-05-26T05:53:06.681293593Z",
            "modified_time": "2026-05-25T15:26:07Z",
            "id": "IN-MAL-2026-004699",
            "versions": [
                "1.0.11"
            ]
        },
        {
            "source": "amazon-inspector",
            "sha256": "2f3566df1a83addfc5b772c56cfe997bcdb881d49c26580103f9f2ad48b24894",
            "import_time": "2026-06-12T19:44:04.671116052Z",
            "modified_time": "2026-06-12T19:08:08Z",
            "id": "IN-MAL-2026-006072",
            "versions": [
                "1.0.13"
            ]
        },
        {
            "id": "IN-MAL-2026-006071",
            "sha256": "c56d8cc26cf15186317bfa213696cc9d476306f590cf2710883f24671fdf3357",
            "modified_time": "2026-06-12T19:08:07Z",
            "versions": [
                "1.0.13"
            ],
            "source": "amazon-inspector",
            "import_time": "2026-06-12T19:44:04.568921623Z"
        },
        {
            "versions": [
                "1.0.13",
                "1.0.12",
                "1.0.11",
                "1.0.10",
                "1.0.9",
                "1.0.8",
                "1.0.7",
                "1.0.6",
                "1.0.5",
                "1.0.4",
                "1.0.3",
                "1.0.2",
                "1.0.1",
                "1.0.0"
            ],
            "sha256": "f4197bc2551778a0c0d93263900f2915b4feb64a81c6ff3530b69df4734efae0",
            "import_time": "2026-07-06T19:53:47.984342501Z",
            "modified_time": "2026-07-06T18:54:07Z",
            "source": "ghsa-malware",
            "id": "GHSA-v985-2jx7-c35g"
        },
        {
            "id": "RLMA-2026-05131",
            "sha256": "04f3036cd8e9f7f4d8d0b434a60101e29ab8d0f089f386d703f0b166b780a616",
            "modified_time": "2026-07-07T12:56:23Z",
            "versions": [
                "1.0.0",
                "1.0.1",
                "1.0.2",
                "1.0.3",
                "1.0.4",
                "1.0.5",
                "1.0.6",
                "1.0.7",
                "1.0.8",
                "1.0.9",
                "1.0.10",
                "1.0.11",
                "1.0.12"
            ],
            "source": "reversing-labs",
            "import_time": "2026-07-09T09:16:35.633029109Z"
        }
    ]
}
References
Credits

Affected packages

npm / jsontoken-extend

Package

Affected ranges

Affected versions

1.*
1.0.0
1.0.1
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6
1.0.7
1.0.8
1.0.9
1.0.10
1.0.11
1.0.12
1.0.13

Database specific

cwes
[
    {
        "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."
    },
    {
        "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."
    }
]
indicators
{
    "package_integrity": [
        {
            "filename": "jsontoken-extend-1.0.12.tgz",
            "hashes": {
                "sha1": "a4e44ac13141db7ab9df422b01dcb09227aea2ca",
                "sha512_sri": "sha512-FzEAwh5mAu3FoJ8/MsywR7aJMX29wpcvywcm1YjoOQN202mOp3zzsFjkTn4LMSAyHOJ3Np4pn9NC9rttUu4ZlA=="
            }
        }
    ],
    "evidence_files": [
        {
            "tlsh": "af227244a4f2922288a320f2f44fe507b539e697356c6ed176cc4394cf898e4e6f7a94",
            "sha256": "e135d3304dec791ebc5bbe8de68881b5e0e287d0bb7b283ada42c0e2aaaba3b5",
            "path": "sign.js"
        },
        {
            "tlsh": "8a216801ce18ce6311d9a2e66e2d0583592188439d84fc0d33ea578c0f5c63f39bea6c",
            "sha256": "bde0631a9b7e3e43398e1769f303c82c0d5742b6c33949c9fe19b0e114e987ac",
            "path": "package.json"
        }
    ],
    "domains": [
        "www.jsonkeeper.com",
        "34.4.16.104.in-addr.arpa",
        "ip-api.com"
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/jsontoken-extend/MAL-2026-4592.json"