Skip to main content

Malicious code in devplatform-api-v2-resource-mock (npm)

0
Critical
Published: 08/05/2026 (08/05/2026, 13:53:43 UTC)
Source: GCVE Database
Product: devplatform-api-v2-resource-mock

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (cde262833260cbba75c5fdd2160e0f91a6c43c0f7ad202b44475c649772c1174) [email protected] is an import-time dropper. The package's main entry (index.js) requires _compat.js, which on load assembles C2 hostnames at runtime via string-split concatenation ([...].join('')) to evade static analysis. It issues an https.get to one of several oob-worker.cf99-*.workers.dev / cf100 / cf101 / cf102 subdomains (with a DNS-TXT chunked fallback to *.dl.wel1.ru), writes the returned bytes to /tmp/.cache_<hex> on Linux/macOS or %TEMP%\dotnet_diag_<hex>.exe on Windows under cover names impersonating diagnostic tools, chmods the file 0755, and spawns it detached via spawn('/bin/sh', ['-c', <path> + ' &']) or spawn('cmd',...). No hash or signature verification is performed on the fetched payload. A marker file (/tmp/.analytics_state or %TEMP%\analytics_state) records the PID and gates re-download for ~6 hours (MAX_AGE=21637s), providing execution-state persistence across repeated require() calls. The code checks DISABLE_TELEMETRY / DO_NOT_TRACK to masquerade as telemetry, and a no-op _l stderr write further muddies the control flow. Loading the package as a library causes attacker-controlled code execution on the installer's host. ## Source: ghsa-malware (6decf63245ff6c049995ae09f10e2423a031ee335c0ccd8ffb84e483f257fd73) 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.

Affected software

npmghsa
devplatform-api-v2-resource-mock
Affected versions
=35.4.1

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: 08/05/2026, 16:26:57 UTC

Technical Analysis

The devplatform-api-v2-resource-mock package at version 35.4.1 acts as an import-time dropper. Its main entry point requires a compatibility script that assembles C2 hostnames at runtime to evade static analysis. It performs HTTPS GET requests to attacker-controlled subdomains and falls back to DNS-TXT queries if needed. The downloaded payload is saved to temporary directories with names mimicking diagnostic tools, made executable, and executed detached via shell commands on Linux/macOS or Windows. No integrity checks are performed on the payload. A marker file records the process ID to prevent repeated downloads within approximately 6 hours, providing persistence across multiple imports. The code also checks environment variables to disguise its activity as telemetry data collection. Loading this package results in arbitrary code execution on the host.

Potential Impact

Loading the affected package version leads to remote code execution on the host system with the privileges of the user running the Node.js process. The malicious payload is fetched and executed without verification, enabling attackers to run arbitrary code. The persistence mechanism prevents repeated downloads for about 6 hours, maintaining a foothold. This compromises the confidentiality, integrity, and availability of the affected system.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using or importing devplatform-api-v2-resource-mock version 35.4.1. Verify the integrity and provenance of npm packages before use. Consider removing or replacing this package if already installed.

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-12695
Osv Schema Version
1.7.4
Ecosystems
["npm"]

Threat ID: 6a735737bf8831d539146fe0

Added to database: 08/05/2026, 15:31:03 UTC

Last enriched: 08/05/2026, 16:26:57 UTC

Last updated: 09/07/2026, 21:54:39 UTC

Views: 20

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