Malicious code in contract-contract-builder (npm)
The npm package 'contract-contract-builder' version 35.5.2 contains malicious code that downloads and executes a platform-specific binary from dynamically assembled Cloudflare Workers hosts. This binary is saved to temporary directories with disguised filenames, given executable permissions, and launched detached from the main process. If HTTPS delivery fails, a DNS TXT record fallback channel reconstructs a base64 payload from multiple DNS TXT records. The package falsely advertises itself as a UI toolkit, but the fetched binary is unrelated, unverified, and executed automatically upon import.
AI Analysis
Technical Summary
The 'contract-contract-builder' npm package (version 35.5.2) includes malicious functionality in its _platform.js file. Upon requiring the package, it downloads a platform-specific binary from Cloudflare Workers hosts whose domain names are constructed at runtime from split string fragments. The binary is saved to temporary directories (/tmp or %TEMP%) under disguised filenames, permissions are set to executable (0755), and it is spawned detached using shell commands or Windows equivalents. If HTTPS delivery of the binary fails, the package uses a DNS TXT record fallback mechanism from the domain *.dl.wel1.ru to reassemble a base64-encoded payload from multiple numbered TXT records. This binary execution occurs automatically on import, and the binary is unpinned and unverified, posing a significant risk. The package misrepresents itself as a UI toolkit, but the actual behavior is malicious code execution.
Potential Impact
This malicious package can execute arbitrary code on the host system without user consent or verification, potentially leading to full system compromise. The use of dynamically assembled download URLs and a DNS TXT fallback channel complicates detection and blocking. Because the binary is executed detached and with executable permissions, it can persist and operate stealthily. This behavior undermines trust in the package and any projects depending on it, potentially exposing systems to malware, data theft, or further compromise.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid using 'contract-contract-builder' version 35.5.2. Audit existing projects for this package and replace it with trusted alternatives. Monitor for any unexpected binaries or processes spawned from temporary directories. Since the package executes code on import, avoid importing or installing untrusted packages. Check vendor advisories or npm security advisories for updates or removal notices. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Malicious code in contract-contract-builder (npm)
Description
The npm package 'contract-contract-builder' version 35.5.2 contains malicious code that downloads and executes a platform-specific binary from dynamically assembled Cloudflare Workers hosts. This binary is saved to temporary directories with disguised filenames, given executable permissions, and launched detached from the main process. If HTTPS delivery fails, a DNS TXT record fallback channel reconstructs a base64 payload from multiple DNS TXT records. The package falsely advertises itself as a UI toolkit, but the fetched binary is unrelated, unverified, and executed automatically upon import.
Affected software
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
Technical Analysis
The 'contract-contract-builder' npm package (version 35.5.2) includes malicious functionality in its _platform.js file. Upon requiring the package, it downloads a platform-specific binary from Cloudflare Workers hosts whose domain names are constructed at runtime from split string fragments. The binary is saved to temporary directories (/tmp or %TEMP%) under disguised filenames, permissions are set to executable (0755), and it is spawned detached using shell commands or Windows equivalents. If HTTPS delivery of the binary fails, the package uses a DNS TXT record fallback mechanism from the domain *.dl.wel1.ru to reassemble a base64-encoded payload from multiple numbered TXT records. This binary execution occurs automatically on import, and the binary is unpinned and unverified, posing a significant risk. The package misrepresents itself as a UI toolkit, but the actual behavior is malicious code execution.
Potential Impact
This malicious package can execute arbitrary code on the host system without user consent or verification, potentially leading to full system compromise. The use of dynamically assembled download URLs and a DNS TXT fallback channel complicates detection and blocking. Because the binary is executed detached and with executable permissions, it can persist and operate stealthily. This behavior undermines trust in the package and any projects depending on it, potentially exposing systems to malware, data theft, or further compromise.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid using 'contract-contract-builder' version 35.5.2. Audit existing projects for this package and replace it with trusted alternatives. Monitor for any unexpected binaries or processes spawned from temporary directories. Since the package executes code on import, avoid importing or installing untrusted packages. Check vendor advisories or npm security advisories for updates or removal notices. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12665
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a735735bf8831d5391420f6
Added to database: 08/05/2026, 15:31:01 UTC
Last enriched: 08/05/2026, 16:20:18 UTC
Last updated: 08/05/2026, 16:20:18 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.