Malicious code in chain-devkit (npm)
The chain-devkit npm package version 1.0.0 includes a postinstall script that fetches a YAML configuration file from an attacker-controlled domain without integrity checks. This YAML is parsed using a vulnerable js-yaml 3.12.0 loader that allows execution of arbitrary JavaScript Function objects embedded in the YAML content. Although the current package version only reads scalar fields and does not automatically execute code, the malicious Function objects persist on disk and could be executed by consumers or future versions of the package. The package is newly published with minimal metadata and no history, indicating a high risk of malicious intent.
AI Analysis
Technical Summary
The chain-devkit npm package (version 1.0.0) executes a postinstall script that downloads a YAML configuration file from https://chain-devkit.com/config without version pinning, hash verification, or signature validation. The YAML is parsed with js-yaml 3.12.0's yaml.load, which supports !!js/function and !!js/regexp tags, enabling the creation of JavaScript Function objects during parsing. These objects are saved to disk and reloaded unsafely on require(), creating a persistent channel for remote code injection controlled by whoever manages chain-devkit.com. Although current code only reads scalar values, the presence of these Function objects means that arbitrary code execution could occur if future package versions or consumers invoke them. The package's publisher metadata is minimal and suspicious, reinforcing the likelihood of malicious intent.
Potential Impact
This vulnerability allows an attacker controlling the chain-devkit.com domain to inject arbitrary JavaScript code into the installation and runtime environment of the chain-devkit package. While immediate code execution is not triggered by the current config content, the malicious code persists on disk and could be executed later by consumers or future package versions, potentially leading to remote code execution within the context of the affected environment.
Mitigation Recommendations
No official patch or fix is currently available for this vulnerability. Users should avoid installing or using chain-devkit version 1.0.0. Since the package fetches configuration from an attacker-controlled domain without integrity checks, the safest mitigation is to remove the package from projects and replace it with trusted alternatives. Monitor vendor advisories for any future updates or official fixes. Do not rely on the package until a verified remediation is released.
Malicious code in chain-devkit (npm)
Description
The chain-devkit npm package version 1.0.0 includes a postinstall script that fetches a YAML configuration file from an attacker-controlled domain without integrity checks. This YAML is parsed using a vulnerable js-yaml 3.12.0 loader that allows execution of arbitrary JavaScript Function objects embedded in the YAML content. Although the current package version only reads scalar fields and does not automatically execute code, the malicious Function objects persist on disk and could be executed by consumers or future versions of the package. The package is newly published with minimal metadata and no history, indicating a high risk of malicious intent.
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 chain-devkit npm package (version 1.0.0) executes a postinstall script that downloads a YAML configuration file from https://chain-devkit.com/config without version pinning, hash verification, or signature validation. The YAML is parsed with js-yaml 3.12.0's yaml.load, which supports !!js/function and !!js/regexp tags, enabling the creation of JavaScript Function objects during parsing. These objects are saved to disk and reloaded unsafely on require(), creating a persistent channel for remote code injection controlled by whoever manages chain-devkit.com. Although current code only reads scalar values, the presence of these Function objects means that arbitrary code execution could occur if future package versions or consumers invoke them. The package's publisher metadata is minimal and suspicious, reinforcing the likelihood of malicious intent.
Potential Impact
This vulnerability allows an attacker controlling the chain-devkit.com domain to inject arbitrary JavaScript code into the installation and runtime environment of the chain-devkit package. While immediate code execution is not triggered by the current config content, the malicious code persists on disk and could be executed later by consumers or future package versions, potentially leading to remote code execution within the context of the affected environment.
Mitigation Recommendations
No official patch or fix is currently available for this vulnerability. Users should avoid installing or using chain-devkit version 1.0.0. Since the package fetches configuration from an attacker-controlled domain without integrity checks, the safest mitigation is to remove the package from projects and replace it with trusted alternatives. Monitor vendor advisories for any future updates or official fixes. Do not rely on the package until a verified remediation is released.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10531
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a55ff6168715ace432f1b21
Added to database: 07/14/2026, 09:20:33 UTC
Last enriched: 07/14/2026, 09:32:17 UTC
Last updated: 07/31/2026, 06:03:14 UTC
Views: 7
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.