Skip to main content

Malicious code in chalk-tempalte (npm)

0
High
Published: 05/20/2026 (05/20/2026, 02:07:31 UTC)
Source: GCVE Database
Product: chalk-tempalte

Description

The npm package 'chalk-tempalte' is a malicious typosquatting package mimicking the popular 'chalk-template' utility. It contains a postinstall script that executes automatically upon installation, which collects host identifiers and sends them via HTTP requests to a remote endpoint. The package also includes a large script with multiple data exfiltration points. This behavior aligns with known npm supply-chain attacks aimed at credential and host data theft. Installing this package risks unauthorized data exfiltration and potential further code execution on the host system.

Affected software

npmghsa
chalk-tempalte
Affected versions
=1.0.15=1.0.16=1.0.14=1.0.17=1.0.19=1.0.20

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: 09/08/2026, 09:23:22 UTC

Technical Analysis

The 'chalk-tempalte' npm package is a deliberate typosquat of the legitimate 'chalk-template' package. Its tarball includes a postinstall.js lifecycle script that imports 'child_process', performs outbound HTTP GET and POST requests, and harvests host identifiers such as hostnames. Additionally, it contains a large 'phantom.js' file with multiple POST sinks, indicating extensive data exfiltration capabilities. The combination of typosquatting, automatic postinstall execution, system metadata harvesting, and outbound network communication matches patterns observed in recent npm supply-chain attacks designed to steal credentials and host data. This package provides a foothold for further malicious code execution after installation.

Potential Impact

Installing 'chalk-tempalte' results in automatic execution of a postinstall script that collects system metadata and transmits it to a remote server, potentially exposing sensitive host information. This exfiltration can lead to unauthorized disclosure of environment details and may enable subsequent malicious actions on the compromised system. The package thus poses a significant risk of data leakage and system compromise.

Mitigation Recommendations

Avoid installing the 'chalk-tempalte' package. Verify package names carefully to prevent typosquatting attacks. Since no official patch or remediation is available, users should remove any installations of this package immediately and audit systems for signs of compromise. Use trusted sources and package integrity verification to prevent supply-chain attacks.

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-4517
Osv Schema Version
1.7.4
Aliases
["GHSA-hvjp-xq9w-c33f"]
Ecosystems
["npm"]

Threat ID: 6a96f319acd9273b49e49701

Added to database: 09/01/2026, 15:45:29 UTC

Last enriched: 09/08/2026, 09:23:22 UTC

Last updated: 09/08/2026, 09:23:22 UTC

Views: 3

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