{"id":"MAL-2026-10127","summary":"Malicious code in eth-react-redirection (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (cbd414dae34760c2eda09d2093a62a14d694f759350676e88229319a16594e78)\nOn 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.\n","modified":"2026-07-13T07:47:02.281603725Z","published":"2026-07-10T15:19:41Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"581bd6ff87fb89c83d76fffd9fac9aab57039cd200f8d9f8991ce3a997511644","import_time":"2026-07-10T15:23:37.331898287Z","id":"IN-MAL-2026-009615","modified_time":"2026-07-10T15:19:41Z","versions":["1.0.0"]},{"versions":["1.0.1"],"source":"amazon-inspector","sha256":"418cda644047def7636e5f2a4f93a5d075e4c7e1788e3ebe2fdcbaeda1cfec9a","import_time":"2026-07-13T07:40:11.925865404Z","id":"IN-MAL-2026-009833","modified_time":"2026-07-13T06:50:36Z"},{"versions":["1.0.2"],"source":"amazon-inspector","sha256":"cbd414dae34760c2eda09d2093a62a14d694f759350676e88229319a16594e78","import_time":"2026-07-13T07:40:11.825623831Z","id":"IN-MAL-2026-009832","modified_time":"2026-07-13T06:50:26Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/eth-react-redirection/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/eth-react-redirection/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/eth-react-redirection/v/1.0.2"}],"affected":[{"package":{"name":"eth-react-redirection","ecosystem":"npm","purl":"pkg:npm/eth-react-redirection"},"versions":["1.0.0","1.0.1","1.0.2"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"evidence_files":[{"path":"lib/levels.js","sha256":"7750397a04f8b936610251ceb6d8b5aa1f2f0c45298935b3bdd8e1e82bc9e24b","tlsh":"cff1a43279f460228a1664f5490fb821b176c50b300db9d9f1ae97a43f8f02d9e33b9d"},{"path":"lib/const.js","sha256":"d10853dde92fdc48d8cb5505d89e0030fd35e1416a16a820fe5ec4aceef01c4f","tlsh":"b9c08c8351f0684b04301bb3a50ca991f2a1d26f0884160231f564844b396a92848fb7"},{"tlsh":"dfc1cfa839a3e0188523b1f5097fa416d476a027202dd9d8b5ecc2d01fddee89523dfb","path":"index.js","sha256":"195c47d5205f56ae30ddd48a1ffbefb40c230264ca4127379b8d4fee15e5da88"},{"tlsh":"cd21bea5d868ac6319ca2591a8690457a136dd078c1cfc0d33e3835c8f9e96f05be73d","path":"package.json","sha256":"2da9a1d64d808db1e2c8821f6efbcca7ae7edbfc0f9eb68684ad2e645e37c089"}],"package_integrity":[{"hashes":{"sha1":"72c8bcdb10e8f0a06a5d4974907b2df2af5bac4b","sha512_sri":"sha512-bO4ifiCEKWzqg7EXmDBvjaiUiIFbfXIVWTk2b+0sMR/bTcleMSFEQWHkcGPeAJcPr2UpKcd3uQYv6LX+VV73Qg=="},"filename":"eth-react-redirection-1.0.0.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/eth-react-redirection/MAL-2026-10127.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}