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 node-denv (npm)

0
Critical
Published: 06/13/2026 (06/13/2026, 07:00:24 UTC)
Source: GCVE Database
Product: node-denv

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (1b0701ad772209918c78eb4d038cce43946517f3558cbec1988c121c115a641d) node-denv presents itself as a pino-compatible logging middleware (index.js exports `module.exports.pino = middleware` and mimics pino's option shape including DEFAULT_LEVELS, formatters.bindings, redact, and customLevels). When a consumer instantiates the middleware, the package spawns a detached `node lib/caller.js` child process. lib/caller.js performs an HTTPS GET against https://jsonkeeper.com/b/EXSIF, reads the `.cookie` field from the JSON response, and passes it to `new Function.constructor("require", s)` invoked with the real `require` — granting the remotely-fetched JavaScript full Node.js capabilities (filesystem, network, child_process, env). The fetch is retried up to 5 times. A second jsonkeeper.com payload URL (https://jsonkeeper.com/b/ZK45J) is base64-encoded as `DEV_API_KEY` in lib/const.js as a fallback C2. jsonkeeper.com is an anonymous mutable JSON paste host — the attacker can change the executed payload at any time without republishing the package. The pino impersonation lures developers searching for the popular logger into installing this package, at which point any normal use triggers remote code execution on the installer's machine. ## Source: ghsa-malware (39fd50e1c53ebcbf807d385f8a99cca3d059175cf50b3819571029c812e719fb) 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
node-denv
Affected versions
=1.3.5

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/11/2026, 12:35:21 UTC

Technical Analysis

node-denv version 1.3.5 is a malicious npm package masquerading as a pino-compatible logging middleware. Upon use, it spawns a detached child process that fetches JavaScript code from a remote JSON paste service (jsonkeeper.com). This code is executed with full Node.js capabilities, including filesystem and network access, enabling remote code execution. The attacker can update the payload dynamically without republishing the package. This results in a fully compromised host where secrets and keys may be exposed or stolen.

Potential Impact

Any system with node-denv version 1.3.5 installed or running is considered fully compromised. The attacker gains full control over the host environment, including access to filesystem, network, environment variables, and the ability to execute arbitrary commands. This can lead to theft of secrets, credentials, and further malware installation. The compromise is persistent and dynamic due to the remote payload fetch mechanism.

Mitigation Recommendations

No official patch or fix is available. The affected package (node-denv version 1.3.5) should be immediately removed from all systems. All secrets, keys, and credentials stored on compromised machines must be rotated from a different, trusted environment. Due to the nature of the compromise, full system reimaging or forensic analysis is recommended to ensure complete removal of malicious artifacts.

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-5734
Osv Schema Version
1.7.4
Aliases
["GHSA-8mfj-gmpr-xqqr"]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a42ed2627e9c7971993458c

Added to database: 06/29/2026, 22:09:42 UTC

Last enriched: 07/11/2026, 12:35:21 UTC

Last updated: 07/28/2026, 14:59:37 UTC

Views: 20

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