Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in antsrcsrctest (npm)

0
High
Published: 07/09/2026 (07/09/2026, 00:00:00 UTC)
Source: GCVE Database
Product: antsrcsrctest

Description

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` (`[email protected]`). 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 software

npmghsa
antsrcsrctest
Affected versions
=1.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/10/2026, 10:21:57 UTC

Technical Analysis

The 'antsrcsrctest' npm package (version 1.0.0) includes a preinstall script that exfiltrates sensitive environment and system information to a remote server at 101.35.44.248. This includes the full process environment variables, hostname, platform, current working directory, container detection files, and outputs of reconnaissance commands such as 'id', 'whoami', 'hostname', and 'ps aux'. Additionally, it accesses the Alibaba Cloud instance metadata service to retrieve temporary IAM credentials and sends these credentials to the attacker. The package's main code is a trivial date formatter, serving as a decoy to conceal the malicious preinstall behavior.

Potential Impact

This malicious package can lead to significant information disclosure, including environment variables, system details, and potentially sensitive cloud credentials from Alibaba Cloud instances. The theft of IAM credentials can allow attackers to escalate privileges and perform unauthorized actions within the cloud environment. The exfiltration occurs silently during package installation, increasing the risk of compromise without immediate detection.

Mitigation Recommendations

No official patch or remediation is currently available for this package. Users should avoid installing 'antsrcsrctest' version 1.0.0 from untrusted sources. Review and restrict permissions for npm package installations, especially in cloud environments. Monitor for unexpected network connections to suspicious IP addresses such as 101.35.44.248. Consider implementing network egress filtering to block unauthorized outbound traffic. Check vendor advisories or npm security advisories for updates or removal of the malicious package from the registry.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-10038
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a50bac068715ace43587750

Added to database: 07/10/2026, 09:26:24 UTC

Last enriched: 07/10/2026, 10:21:57 UTC

Last updated: 07/31/2026, 06:38:26 UTC

Views: 71

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses