{"id":"MAL-2026-17507","revision":"e4d37496c5264983882960ff9033ba46","records":[{"revision":"e4d37496c5264983882960ff9033ba46","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-17507","aliases":[],"title":"Malicious code in hardhat-jsx (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (62ac44be2745338b73861690e7f979216fdfc6c3797dfa2f450e9063aa4158d1)\nThe package is published as 'hardhat-jsx' but its metadata, documentation, and lib/ layout impersonate the pino logger (keywords 'fast','logger','stream','json'; shipped docs reference pinojs/pino). The main entry index.js unconditionally requires./lib/config, which is a 4,499,968-byte single-line obfuscator.io artifact — a hex-escaped string array of ~26,234 entries with string-array rotation and control-flow flattening (22,707 decoder-wrapper inlines, 44,499 string-inline changes). A legitimate pino 'config' module is ~1-2KB; a multi-megabyte obfuscated blob auto-loaded by the main entry is a loader/dropper. The surface index.js exports a no-op Express-style middleware whose comment claims it 'triggers a background process', providing a cover story adjacent to the obfuscated require. Loading the package via require/import executes the opaque payload in the installer's process. The name/content mismatch (hardhat-jsx vs. pino impersonation), the stub façade, and the heavily obfuscated auto-loaded module together form a trojan-package shape.\n","state":0,"publishedAt":"2026-10-04T23:28:05+00:00","modifiedAt":"2026-10-04T23:45:20.3080196+00:00","affected":[{"ecosystem":"npm","name":"hardhat-jsx","ranges":[],"versions":["2.0.1"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/hardhat-jsx/v/2.0.1"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-17507","license":"OSV · upstream source license applies","key":"osv:MAL-2026-17507","identifiers":["MAL-2026-17507"]},"retained":false,"historicalAffected":[]}],"coverage":[]}