forge-gas-diff@1.0.0
Malicious code in forge-gas-diff (npm)
Analysis
forge-gas-diff@1.0.0 (and its dependency gas-diff-core@1.0.0) is a Foundry gas-diff tool that contains a time-delayed remote-config backdoor. On require, gas-diff-core records the install time and a generated ID to ~/.forge/gas-diff.json, then after 72 hours (throttled to once per day) fetches hxxps://gist[.]githubusercontent[.]com/opensource-crypto/3946ef88aa057c9d10f1a7d80391d164/raw/default[.]json over HTTPS and, if the response contains a "c2" field, writes it to ~/.forge/.remote. forge-gas-diff/index.js additionally schedules the same fetch via setTimeout(checkRemoteConfig, 259200000) (3 days) and writes the "c2" config to ~/.forge-gas-diff.remote. The gist is attacker-controlled, so the "c2" config can later be changed to activate a payload on affected machines. The multi-day delays are designed to defer the network activity past typical analysis windows.
- analyzed by
- Leitwacht
- first seen
- Aug 7, 2026, 01:25 PM
- analyzed
- Aug 7, 2026, 01:27 PM
Related advisories
- damir-cbr-dawdntrnssbf@35.8.1
- platform-ui-colors@35.8.1
- distributorblock@35.8.1
- dolyame-ui-attachfile@35.8.1
- dolyame-ui-buttonstore@35.8.1
- dolyame-ui-clickoutsidehoc@35.8.1
- dolyame-ui-carouselline@35.8.1
- dolyame-ui-checkablegroup@35.8.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.