Malicious code in react-next-dom (npm)
The npm package react-next-dom is a malicious package masquerading as a legitimate React/Next.js ecosystem library. It contains a hidden remote code loader that fetches and executes attacker-controlled JavaScript code with full Node.js require access, enabling arbitrary code execution. The package uses a detached child process to load payloads from an anonymous public paste service, allowing the attacker to modify the executed code at will. This compromises any system that installs or runs the package, potentially exposing all stored secrets and keys. Immediate removal and secret rotation are strongly recommended.
AI Analysis
Technical Summary
react-next-dom is a malicious npm package that impersonates React/Next.js ecosystem packages and the pino logging library to conceal a remote code loader. Its main export is middleware that spawns a detached Node.js child process running lib/caller.js, which fetches JavaScript payloads from attacker-controlled URLs on jsonkeeper.com. The payload is executed in the host Node.js process using a dynamic Function constructor with full require access, allowing arbitrary code execution. Additional payload URLs are hidden as base64-encoded constants. Because jsonkeeper.com is an anonymous public paste service, the attacker can modify the payloads at any time, maintaining persistent control over compromised hosts. The package versions =17.2.7, =1.1.7, and =17.2.8 are affected.
Potential Impact
Systems that install or run react-next-dom are fully compromised, as the package enables arbitrary remote code execution with full Node.js require privileges. This can lead to complete system takeover, data exfiltration, and unauthorized access to secrets and keys stored on the host. The attacker can modify the remote payloads at any time, maintaining persistent control. Removal of the package alone does not guarantee eradication of all malicious components or backdoors.
Mitigation Recommendations
Remove the react-next-dom package immediately from all affected systems. Rotate all secrets, keys, and credentials stored on compromised hosts from a separate, secure environment. Because the attacker may have persistent access, conduct a thorough investigation and consider rebuilding affected systems. No official patch or fix is available. Monitor for any suspicious activity related to this package.
Malicious code in react-next-dom (npm)
Description
The npm package react-next-dom is a malicious package masquerading as a legitimate React/Next.js ecosystem library. It contains a hidden remote code loader that fetches and executes attacker-controlled JavaScript code with full Node.js require access, enabling arbitrary code execution. The package uses a detached child process to load payloads from an anonymous public paste service, allowing the attacker to modify the executed code at will. This compromises any system that installs or runs the package, potentially exposing all stored secrets and keys. Immediate removal and secret rotation are strongly recommended.
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
react-next-dom is a malicious npm package that impersonates React/Next.js ecosystem packages and the pino logging library to conceal a remote code loader. Its main export is middleware that spawns a detached Node.js child process running lib/caller.js, which fetches JavaScript payloads from attacker-controlled URLs on jsonkeeper.com. The payload is executed in the host Node.js process using a dynamic Function constructor with full require access, allowing arbitrary code execution. Additional payload URLs are hidden as base64-encoded constants. Because jsonkeeper.com is an anonymous public paste service, the attacker can modify the payloads at any time, maintaining persistent control over compromised hosts. The package versions =17.2.7, =1.1.7, and =17.2.8 are affected.
Potential Impact
Systems that install or run react-next-dom are fully compromised, as the package enables arbitrary remote code execution with full Node.js require privileges. This can lead to complete system takeover, data exfiltration, and unauthorized access to secrets and keys stored on the host. The attacker can modify the remote payloads at any time, maintaining persistent control. Removal of the package alone does not guarantee eradication of all malicious components or backdoors.
Mitigation Recommendations
Remove the react-next-dom package immediately from all affected systems. Rotate all secrets, keys, and credentials stored on compromised hosts from a separate, secure environment. Because the attacker may have persistent access, conduct a thorough investigation and consider rebuilding affected systems. No official patch or fix is available. Monitor for any suspicious activity related to this package.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6825
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-99rj-fjph-w44m"]
- Ecosystems
- ["npm"]
Threat ID: 6a4c341527e9c797195f7ed9
Added to database: 07/06/2026, 23:02:45 UTC
Last enriched: 09/12/2026, 21:16:43 UTC
Last updated: 09/13/2026, 21:56:14 UTC
Views: 93
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.