mal-2026-10038
Vulnerability from ossf_malicious_packages
The npm package antsrcsrctest masquerades as a "simple date formatting utility" (index.js exports a harmless formatDate() function that is never referenced by the malicious code) but is a credential-harvesting and cloud-metadata-stealing reconnaissance tool. It declares a preinstall: node preinstall.js hook, so the payload executes automatically on npm install, before the package is ever imported or used. preinstall.js collects os.hostname(), os.platform(), process.cwd(), and the victim's entire process.env (all environment variables, frequently containing API keys, tokens and secrets); fingerprints container context by checking for /.dockerenv and reading /proc/1/cgroup and /proc/self/mountinfo; runs local reconnaissance commands via child_process.execSync (id, whoami, hostname, ps aux); and performs SSRF against the Alibaba Cloud (Aliyun) instance metadata service at http://100.100.100.200/latest/meta-data/, specifically probing /latest/meta-data/ram/security-credentials/ in an attempt to steal cloud IAM role credentials. All of the above (including the full environment variable dump) is exfiltrated via two plaintext HTTP POST requests (to / and /env) to a hardcoded C2 endpoint http://101.35.44.248 (raw IP, port 80, no TLS) using Node's built-in http module. All errors are silently swallowed so the attack is invisible to the installer. The package was published by npm user xingzhigege (xingzhi@foxmail.com).
Analysis performed via static review only (npm registry metadata and package source retrieved as text via the npm registry and unpkg CDN) — the package was not installed or executed.
-= Per source details. Do not edit below this line.=-
Source: amazon-inspector (80da6b239fe02ae1bbf7086d885062181d9ea048490ad77911a63ae4c393cc42)
On npm install, the declared preinstall script (preinstall.js) POSTs the installer's full process.env, os.hostname(), os.platform(), cwd, container-detection artifacts (/.dockerenv, /proc/1/cgroup, /proc/self/mountinfo), and the output of shell reconnaissance commands (id, whoami, hostname, ps aux) to http://101.35.44.248 over plain HTTP. The script additionally issues curl requests to the Alibaba Cloud instance metadata service at 100.100.100.200, including the latest/meta-data/ram/security-credentials/ path that returns temporary IAM credentials for the instance role, and forwards the response to the same attacker endpoint. The package advertises itself as "a simple date formatting utility" and index.js contains only a 7-line date formatter, confirming a decoy cover story for install-time credential theft and environment exfiltration.
Source: ossf-package-analysis (f7c7439acf2736b50448bcb0f682babcb4ad09d0f316acb5ec5442130f3ee3f2)
The OpenSSF Package Analysis project identified 'antsrcsrctest' @ 1.0.0 (npm) as malicious.
It is considered malicious because:
- The package executes one or more commands associated with malicious behavior.
{
"affected": [
{
"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"
}
],
"indicators": {
"evidence_files": [
{
"path": "preinstall.js",
"sha256": "00f545b1474cd7ceb299c7ff2e7b4ad7720e1b9634876e45f178874d218ff998",
"tlsh": "3b5163c35775b3305aa18a99e69b3101a723f54bab04ebd4b18c82220f5d81826bbad4"
},
{
"path": "package.json",
"sha256": "b142c38288be48cf988ac54c367d7c2a6e58b0cf8792c04ecc5aea067b53645d",
"tlsh": "9dd0a7244e11d87719c45ae26a638506fea56d1a025c7c4873c75109838ebb284bf70e"
}
],
"package_integrity": [
{
"filename": "antsrcsrctest-1.0.0.tgz",
"hashes": {
"sha1": "42d2f1304f875cf0c34f8a86aeef3cb94eb4c89f",
"sha512_sri": "sha512-weciHP6EFl97SfBU0rEkhm869yXnUu8AlWa5hoM31fJ6iAB34B5DsWjgkI4T7m1U4DKA2Bm3ZBoVILsQ/9u/lQ=="
}
}
]
}
},
"package": {
"ecosystem": "npm",
"name": "antsrcsrctest"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"versions": [
"1.0.0"
]
}
],
"credits": [
{
"contact": [
"inspector-research@amazon.com"
],
"name": "Amazon Inspector",
"type": "FINDER"
},
{
"contact": [
"https://github.com/ossf/package-analysis",
"https://openssf.slack.com/channels/package_analysis"
],
"name": "OpenSSF: Package Analysis",
"type": "FINDER"
},
{
"contact": [
"https://safedep.io"
],
"name": "SafeDep",
"type": "FINDER"
},
{
"contact": [
"https://research.codelake.dev/advisories/clr-2026-2999-antsrcsrctest"
],
"name": "codelake Research",
"type": "FINDER"
}
],
"database_specific": {
"iocs": {
"hashes": [
"sha256:b4a1a62c75f239d8201c65cdcda5a21e90eff76a41562a2a1902403ccd4c5f9d"
],
"ips": [
"101.35.44.248"
],
"urls": [
"http://101.35.44.248/",
"http://101.35.44.248/env"
]
},
"malicious-packages-origins": [
{
"id": "IN-MAL-2026-009101",
"import_time": "2026-07-09T16:20:40.706334025Z",
"modified_time": "2026-07-09T15:28:28Z",
"sha256": "80da6b239fe02ae1bbf7086d885062181d9ea048490ad77911a63ae4c393cc42",
"source": "amazon-inspector",
"versions": [
"1.0.0"
]
},
{
"import_time": "2026-07-15T05:49:39.984774304Z",
"modified_time": "2026-07-09T03:51:07Z",
"sha256": "f7c7439acf2736b50448bcb0f682babcb4ad09d0f316acb5ec5442130f3ee3f2",
"source": "ossf-package-analysis",
"versions": [
"1.0.0"
]
}
]
},
"details": "The npm package `antsrcsrctest` masquerades as a \"simple date formatting utility\" (`index.js` exports a harmless `formatDate()` function that is never referenced by the malicious code) but is a credential-harvesting and cloud-metadata-stealing reconnaissance tool. It declares a `preinstall: node preinstall.js` hook, so the payload executes automatically on `npm install`, before the package is ever imported or used. `preinstall.js` collects `os.hostname()`, `os.platform()`, `process.cwd()`, and the victim\u0027s entire `process.env` (all environment variables, frequently containing API keys, tokens and secrets); fingerprints container context by checking for `/.dockerenv` and reading `/proc/1/cgroup` and `/proc/self/mountinfo`; runs local reconnaissance commands via `child_process.execSync` (`id`, `whoami`, `hostname`, `ps aux`); and performs SSRF against the Alibaba Cloud (Aliyun) instance metadata service at `http://100.100.100.200/latest/meta-data/`, specifically probing `/latest/meta-data/ram/security-credentials/` in an attempt to steal cloud IAM role credentials. All of the above (including the full environment variable dump) is exfiltrated via two plaintext HTTP POST requests (to `/` and `/env`) to a hardcoded C2 endpoint `http://101.35.44.248` (raw IP, port 80, no TLS) using Node\u0027s built-in `http` module. All errors are silently swallowed so the attack is invisible to the installer. The package was published by npm user `xingzhigege` (`xingzhi@foxmail.com`).\n\nAnalysis performed via static review only (npm registry metadata and package source retrieved as text via the npm registry and unpkg CDN) \u2014 the package was not installed or executed.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (80da6b239fe02ae1bbf7086d885062181d9ea048490ad77911a63ae4c393cc42)\nOn `npm install`, the declared preinstall script (preinstall.js) POSTs the installer\u0027s full `process.env`, `os.hostname()`, `os.platform()`, cwd, container-detection artifacts (`/.dockerenv`, `/proc/1/cgroup`, `/proc/self/mountinfo`), and the output of shell reconnaissance commands (`id`, `whoami`, `hostname`, `ps aux`) to `http://101.35.44.248` over plain HTTP. The script additionally issues `curl` requests to the Alibaba Cloud instance metadata service at `100.100.100.200`, including the `latest/meta-data/ram/security-credentials/` path that returns temporary IAM credentials for the instance role, and forwards the response to the same attacker endpoint. The package advertises itself as \"a simple date formatting utility\" and index.js contains only a 7-line date formatter, confirming a decoy cover story for install-time credential theft and environment exfiltration.\n\n## Source: ossf-package-analysis (f7c7439acf2736b50448bcb0f682babcb4ad09d0f316acb5ec5442130f3ee3f2)\nThe OpenSSF Package Analysis project identified \u0027antsrcsrctest\u0027 @ 1.0.0 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package executes one or more commands associated with malicious behavior.\n",
"id": "MAL-2026-10038",
"modified": "2026-07-28T08:16:09Z",
"published": "2026-07-09T00:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://www.npmjs.com/package/antsrcsrctest/v/1.0.0"
},
{
"type": "PACKAGE",
"url": "https://www.npmjs.com/package/antsrcsrctest"
},
{
"type": "ADVISORY",
"url": "https://research.codelake.dev/advisories/clr-2026-2999-antsrcsrctest"
}
],
"schema_version": "1.7.4",
"summary": "Malicious code in antsrcsrctest (npm)"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.