eth-codergen
This report shows the evidence for eth-codergen@1.0.2. 3 of 4 known versions are blocked or flagged. The newest version, 0.0.1-security, is allowed. See all versions.
OpenSSF/OSV Malicious Advisory
imported 3mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-11033 confirms this npm version as malicious.
Advisory
MAL-2026-11033
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in eth-codergen (npm)
Details
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.
## Source: ghsa-malware (69eee48bc43bf04d3a35021657809e8e2615ae84250ee1e7b229175969807a25) 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.
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to eth-codergen@1.0.2.
The same advisory and Firewall decision cover 2 recorded versions
1.0.1, 1.0.2
The versions list below shows the verdict for each recorded version.
- Avoid installing eth-codergen@1.0.2. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.