-= Per source details. Do not edit below this line.=-
The package is advertised as an Ethereum ABI code generator but its index.js is a verbatim copy of the unrelated mongoose-lean-hooks plugin. Appended to the same line as module.exports = leanhooksPlugin; (padded with whitespace to push it off-screen) is a top-level Function("tQ4eR5v",...) call whose body is a custom hex/XOR-mixer decoder (constants 0x9e3779b9, 0x243f6a88, 0x6a09e667) that reconstructs an opaque payload from an encoded byte array and executes it. The obfuscated loader runs automatically whenever a consumer calls require('eth-codergen'), giving the publisher arbitrary code execution in the consumer's Node.js process. The package name differs by one letter from the legitimate eth-codegen package, and the README even instructs npm install --save-dev eth-codegen, indicating the package is positioned to catch developers who mistype the real package name. No Ethereum/ABI codegen functionality is present in the shipped code.
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.
{
"malicious-packages-origins": [
{
"id": "GHSA-87w3-vjw9-8h4w",
"modified_time": "2026-07-23T18:28:21Z",
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"sha256": "69eee48bc43bf04d3a35021657809e8e2615ae84250ee1e7b229175969807a25",
"import_time": "2026-07-23T22:48:43.760148363Z",
"source": "ghsa-malware"
},
{
"id": "IN-MAL-2026-011156",
"modified_time": "2026-08-04T21:40:34Z",
"versions": [
"1.0.2"
],
"source": "amazon-inspector",
"import_time": "2026-08-04T22:30:02.276038516Z",
"sha256": "dda2a0fbfa98304482ef90da4f137c863775959e107fccd495311fcba4fd185c"
},
{
"source": "amazon-inspector",
"modified_time": "2026-08-04T21:45:59Z",
"versions": [
"1.0.1"
],
"sha256": "f10eded6dcf01b6124157b32fa2341e4dab71dbac8292322433793df23fd0106",
"id": "IN-MAL-2026-011194",
"import_time": "2026-08-04T22:30:04.390192002Z"
},
{
"sha256": "ff0a11feb828f0a0d4f2baf885ad43b74dc4fb8ed2223c9cb3bbcc8ceeba53a9",
"modified_time": "2026-08-04T21:45:51Z",
"versions": [
"1.0.0"
],
"source": "amazon-inspector",
"id": "IN-MAL-2026-011193",
"import_time": "2026-08-04T22:30:04.223363718Z"
}
]
}[
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
}
]
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/eth-codergen/MAL-2026-11033.json"
{
"evidence_files": [
{
"path": "index.js",
"sha256": "38de1f04d737182b9c5f87d7aff8b0e6f778fe14c1407c38b915e8da2fb610fb",
"tlsh": "0ae3bb4029927428a90dc1e245b88ffec747599ea748b85fe142e4daf1f4bf354fca18"
},
{
"path": "package.json",
"sha256": "f2142414d1b0c033b7534cf7394ddda10a71f19026b34ef5070f6db99b019bb1",
"tlsh": "2e012400d828ae3705dda5a55869419ba1349c0b9948bc1d3387835d4b4d82f22b9a5e"
}
]
}