Malicious code in eth-react-redirection (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (cbd414dae34760c2eda09d2093a62a14d694f759350676e88229319a16594e78) On require(), index.js calls callCallerAsOrigin() which spawns lib/caller.js as a detached, stdio-ignored child process (spawn(process.execPath, [script], { detached: true, stdio: 'ignore' }); child.unref()). The worker POSTs to a runtime-reconstructed URL using axios in a retry loop and, on error responses (401/404 shape), reads a `token` field from response.data and passes it to `new module.exports.constructor(arg, token)(require)` — the Node Function constructor — executing attacker-controlled JavaScript in the installer's Node process with the host `require` handed in. lib/caller.js and lib/config.js are wrapped in `Function(name, "...")({...})` with custom base-alphabet decoders that reconstruct every function name, HTTP header, method, and URL fragment at runtime, deliberately concealing the destination and the exec sink. Package metadata is a cover story: package.json describes the package as a React navigation library, keywords list chai/testing/jwt/xss/sqli, and index.js actually exports a chai-plugin while also launching the background code-fetch worker. The combination of detached-on-import worker, obfuscated remote endpoint, Function-constructor execution of response bytes, and retry/poll loop is a live remote-code-execution and polling C2 channel triggered by installing and importing this package.
AI Analysis
Technical Summary
The eth-react-redirection npm package (version 1.0.0) is a malicious package that pretends to be a React navigation library but actually contains injected remote code execution payloads. Its lib/levels.js file includes a top-level immediately-invoked function expression (IIFE) that performs an HTTP GET request to an attacker-controlled URL. If the response is a 404, it extracts a token from the response body and executes it as JavaScript code with the package's require binding, enabling arbitrary code execution. Additionally, it stores a base64-encoded secondary URL used as a backup payload source. The index.js file spawns a detached Node.js child process with ignored stdio and unreferenced handles on every require, further obfuscating malicious activity. This remote-execution occurs immediately upon requiring the package, meaning any consumer of this package is at risk of executing attacker-supplied code.
Potential Impact
Any application or environment that installs and requires eth-react-redirection version 1.0.0 is vulnerable to remote code execution by an attacker controlling the payload URLs. This allows arbitrary JavaScript execution within the context of the Node.js process, potentially leading to full system compromise, data theft, or further malicious activity. The malicious code executes silently and immediately on module load, increasing the risk of unnoticed exploitation.
Mitigation Recommendations
No official patch or remediation is currently available for eth-react-redirection version 1.0.0. Users should immediately remove this package from their dependencies and avoid installing or requiring it. Since the package fetches payloads over unencrypted HTTP from attacker-controlled endpoints, blocking network access to these URLs can provide temporary mitigation. Monitor dependency sources carefully to avoid installing similarly disguised malicious packages. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Malicious code in eth-react-redirection (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (cbd414dae34760c2eda09d2093a62a14d694f759350676e88229319a16594e78) On require(), index.js calls callCallerAsOrigin() which spawns lib/caller.js as a detached, stdio-ignored child process (spawn(process.execPath, [script], { detached: true, stdio: 'ignore' }); child.unref()). The worker POSTs to a runtime-reconstructed URL using axios in a retry loop and, on error responses (401/404 shape), reads a `token` field from response.data and passes it to `new module.exports.constructor(arg, token)(require)` — the Node Function constructor — executing attacker-controlled JavaScript in the installer's Node process with the host `require` handed in. lib/caller.js and lib/config.js are wrapped in `Function(name, "...")({...})` with custom base-alphabet decoders that reconstruct every function name, HTTP header, method, and URL fragment at runtime, deliberately concealing the destination and the exec sink. Package metadata is a cover story: package.json describes the package as a React navigation library, keywords list chai/testing/jwt/xss/sqli, and index.js actually exports a chai-plugin while also launching the background code-fetch worker. The combination of detached-on-import worker, obfuscated remote endpoint, Function-constructor execution of response bytes, and retry/poll loop is a live remote-code-execution and polling C2 channel triggered by installing and importing this package.
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 eth-react-redirection npm package (version 1.0.0) is a malicious package that pretends to be a React navigation library but actually contains injected remote code execution payloads. Its lib/levels.js file includes a top-level immediately-invoked function expression (IIFE) that performs an HTTP GET request to an attacker-controlled URL. If the response is a 404, it extracts a token from the response body and executes it as JavaScript code with the package's require binding, enabling arbitrary code execution. Additionally, it stores a base64-encoded secondary URL used as a backup payload source. The index.js file spawns a detached Node.js child process with ignored stdio and unreferenced handles on every require, further obfuscating malicious activity. This remote-execution occurs immediately upon requiring the package, meaning any consumer of this package is at risk of executing attacker-supplied code.
Potential Impact
Any application or environment that installs and requires eth-react-redirection version 1.0.0 is vulnerable to remote code execution by an attacker controlling the payload URLs. This allows arbitrary JavaScript execution within the context of the Node.js process, potentially leading to full system compromise, data theft, or further malicious activity. The malicious code executes silently and immediately on module load, increasing the risk of unnoticed exploitation.
Mitigation Recommendations
No official patch or remediation is currently available for eth-react-redirection version 1.0.0. Users should immediately remove this package from their dependencies and avoid installing or requiring it. Since the package fetches payloads over unencrypted HTTP from attacker-controlled endpoints, blocking network access to these URLs can provide temporary mitigation. Monitor dependency sources carefully to avoid installing similarly disguised malicious packages. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10127
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a520eef68715ace4391da8f
Added to database: 07/11/2026, 09:37:51 UTC
Last enriched: 07/11/2026, 10:11:19 UTC
Last updated: 07/31/2026, 08:04:46 UTC
Views: 30
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.