Malicious code in forge-gas-diff (npm)
The npm package forge-gas-diff version 1.0.0 contains malicious code that schedules a delayed network request to a third-party GitHub gist controlled by an unrelated account. This request retrieves JSON data which, if containing a 'c2' field, is saved locally for later use. The package also generates and stores a unique per-host identifier. These behaviors are undocumented, unrelated to the advertised functionality, and enable a remote-config-driven mechanism for potential malicious updates or commands.
AI Analysis
Technical Summary
The forge-gas-diff npm package version 1.0.0 includes hidden malicious functionality. Upon module load or CLI execution, it schedules a setTimeout for 3 days to fetch JSON data from a GitHub gist hosted by an account unrelated to the package publisher. If the fetched JSON contains a 'c2' field, its value is persisted to a local file (~/.forge-gas-diff.remote). Additionally, a per-host UUID is generated and stored (~/.forge-gas-diff) to fingerprint the installation. This mechanism acts as a remote-config-driven dropper, allowing the attacker to change the gist content at any time without republishing the package, effectively creating a hidden update channel. These actions are not documented and have no relation to the package's advertised gas-diff functionality.
Potential Impact
This malicious behavior enables an attacker to remotely control or influence the compromised system by delivering arbitrary commands or payloads via the mutable GitHub gist. The persistence of a unique install ID allows tracking or targeted attacks. The delayed fetch evades typical install-time sandboxing, increasing the risk of undetected compromise. While no active exploits are reported, the package's design facilitates stealthy remote control and potential further malicious payload delivery.
Mitigation Recommendations
Users should immediately uninstall the forge-gas-diff package version 1.0.0 and avoid using this package from untrusted sources. Since no patch or official fix is available, remediation involves removing the package and deleting the files ~/.forge-gas-diff and ~/.forge-gas-diff.remote to remove persisted data. Monitor for any unusual network activity related to this package and verify dependencies before installation to prevent similar supply chain attacks.
Malicious code in forge-gas-diff (npm)
Description
The npm package forge-gas-diff version 1.0.0 contains malicious code that schedules a delayed network request to a third-party GitHub gist controlled by an unrelated account. This request retrieves JSON data which, if containing a 'c2' field, is saved locally for later use. The package also generates and stores a unique per-host identifier. These behaviors are undocumented, unrelated to the advertised functionality, and enable a remote-config-driven mechanism for potential malicious updates or commands.
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 forge-gas-diff npm package version 1.0.0 includes hidden malicious functionality. Upon module load or CLI execution, it schedules a setTimeout for 3 days to fetch JSON data from a GitHub gist hosted by an account unrelated to the package publisher. If the fetched JSON contains a 'c2' field, its value is persisted to a local file (~/.forge-gas-diff.remote). Additionally, a per-host UUID is generated and stored (~/.forge-gas-diff) to fingerprint the installation. This mechanism acts as a remote-config-driven dropper, allowing the attacker to change the gist content at any time without republishing the package, effectively creating a hidden update channel. These actions are not documented and have no relation to the package's advertised gas-diff functionality.
Potential Impact
This malicious behavior enables an attacker to remotely control or influence the compromised system by delivering arbitrary commands or payloads via the mutable GitHub gist. The persistence of a unique install ID allows tracking or targeted attacks. The delayed fetch evades typical install-time sandboxing, increasing the risk of undetected compromise. While no active exploits are reported, the package's design facilitates stealthy remote control and potential further malicious payload delivery.
Mitigation Recommendations
Users should immediately uninstall the forge-gas-diff package version 1.0.0 and avoid using this package from untrusted sources. Since no patch or official fix is available, remediation involves removing the package and deleting the files ~/.forge-gas-diff and ~/.forge-gas-diff.remote to remove persisted data. Monitor for any unusual network activity related to this package and verify dependencies before installation to prevent similar supply chain attacks.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13516
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a75f712bf8831d53984fc2a
Added to database: 08/07/2026, 15:17:38 UTC
Last enriched: 08/07/2026, 15:49:31 UTC
Last updated: 08/07/2026, 16:32:24 UTC
Views: 3
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.