Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in hatdhat-testkit (npm)

0
Critical
Published: 08/23/2026 (08/23/2026, 03:14:11 UTC)
Source: GCVE Database
Product: hatdhat-testkit

Description

The npm package hatdhat-testkit version 3.2.14 masquerades as a pino-style logging utility but contains malicious code. Its middleware entrypoint spawns a detached Node process that fetches and executes remote code from an obfuscated URL, granting full Node.js capabilities to the attacker. This behavior is unrelated to the advertised functionality and is designed to evade inspection.

Affected software

npmghsa
hatdhat-testkit
Affected versions
=3.2.14

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/23/2026, 13:50:31 UTC

Technical Analysis

The hatdhat-testkit npm package version 3.2.14 includes a middleware entrypoint (index.js) that launches a detached Node process (lib/caller.js). This process contains a fake process object with environment variables holding base64-encoded strings that decode to a remote URL, a request header name, and a secret key value. The package fetches a mutable JSON blob from the remote URL and executes the 'cookie' field of the response as JavaScript code using new Function.constructor with require() access. This grants the remote payload full Node.js capabilities, enabling arbitrary code execution unrelated to the package's advertised logging functionality. The obfuscation of the URL and header is intended to evade detection.

Potential Impact

Successful exploitation allows an attacker to execute arbitrary code with full Node.js privileges on any system running the affected package version. This can lead to complete compromise of the host environment, data theft, or further malicious activities. The malicious behavior is hidden behind legitimate package functionality, increasing the risk of unnoticed compromise.

Mitigation Recommendations

No official patch or remediation guidance is currently available. Users should immediately remove or avoid using hatdhat-testkit version 3.2.14. Monitor for updates from the package maintainer or npm registry for any official fixes or removals. Until then, do not install or deploy this package in any environment.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-14373
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a8af9a3acd9273b49f32efb

Added to database: 08/23/2026, 13:46:11 UTC

Last enriched: 08/23/2026, 13:50:31 UTC

Last updated: 08/23/2026, 23:11:10 UTC

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses