Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in gas-log (npm)

0
Critical
Published: 07/08/2026 (07/08/2026, 08:21:06 UTC)
Source: GCVE Database
Product: gas-log

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (36241e999d92bad738082bf420fc144391735f9f3707bc4baa0153b4cb0eec8a) gas-log impersonates the legitimate eth-gas-reporter package: it reuses that project's README, keywords, badges, and CHANGELOG, and the README even instructs users to install the target name. The exported Mocha reporter in index.js contains two near-identical implementations. The real reporter (Gas) is defined but not exported; the exported function (log) sets `var opt = 1` and unconditionally enters an else branch that calls `utils.connectNet(...)`, making the always-false `if (!opt)` guard a dead-code gate that hides the payload as an unreachable variant of the legitimate code. utils.connectNet spawns a detached, unref'd `node lib/syncResolve.js` child so the loader outlives the parent Mocha process. lib/syncResolve.js issues `axios.get(DEV_URI, { headers: { 'x-secret-key': '_' } })`, extracts `.data.Cookie` from the response, and passes it to `new Function.constructor('require', result)` with `require` bound in, then invokes it — an eval of attacker-controlled response bytes with full Node module access, retried 5 times. DEV_URI is empty in this shipped version so the fetch will fail today, but the mechanism is complete and armed: any future publish, DNS resolution, or same-origin redirect activates full RCE on any developer who runs mocha with this reporter. The typosquat framing, the dead-code gate, and the fetch → eval → detached-child chain together are unambiguous supply-chain attack intent. ## Source: ghsa-malware (30475d80d69fa45b40a86bc3d91a9ed3c29f15d9c6d500760fc91e1ea303e8d5) 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
gas-log

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: 07/08/2026, 13:30:05 UTC

Technical Analysis

The 'gas-log' npm package is identified as malicious software that, when installed or executed, fully compromises the host system. This compromise includes potential unauthorized access and control, making all stored secrets and keys vulnerable. Due to the severity of the compromise, simply uninstalling the package is insufficient to ensure system integrity, as additional malicious components may persist.

Potential Impact

Any system with the 'gas-log' package installed or running should be considered fully compromised. Attackers may have gained complete control over the system, exposing all stored secrets and keys. This level of compromise poses a critical risk to confidentiality, integrity, and availability of the affected system and its data.

Mitigation Recommendations

Remove the 'gas-log' package immediately. Rotate all secrets and keys from a separate, uncompromised machine to prevent further unauthorized access. Because the system is likely fully compromised, consider rebuilding or restoring the system from a known good backup to ensure complete removal of malicious software.

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-6962
Osv Schema Version
1.7.4
Aliases
["GHSA-24x9-3433-gqp9"]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a4e4ed4c9d9e3dbe3287dce

Added to database: 07/08/2026, 13:21:24 UTC

Last enriched: 07/08/2026, 13:30:05 UTC

Last updated: 07/26/2026, 14:22:35 UTC

Views: 34

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