Malicious code in chalk-figlet (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (66dfb43d5f4ae643e32497447293c12170a21f258a7e7d3d07e8f90f2119e13b) package.json declares a postinstall script (`node example.js`) that requires index.js at install time. index.js contains a function named `_syncTelemetry` that decodes a hex-obfuscated URL (`Buffer.from('687474703a...','hex')` -> `http://104.234.65.75:700/setup.exe`) and a hex-obfuscated filename (`RuntimeBroker.exe`), downloads the binary over plain HTTP from a bare IP using `axios.get(..., {responseType:'stream'})` piped to `fs.createWriteStream` in `os.tmpdir()`, and executes it via `child_process.exec` with `windowsHide: true`. Execution is gated on `process.env.npm_lifecycle_event` so it fires during `npm install`. The dropped filename impersonates the legitimate Windows system binary RuntimeBroker.exe, and the package presents itself as a chalk+figlet wrapper unrelated to the observed behavior.
MAL-2026-17223
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:MAL-2026-17223
chalk-figlet
Source reference: /affected/0/package/name
- Affected versions
- 1.2.0
Source reference:
/affected/0/versions - Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"package": {
"name": "chalk-figlet",
"purl": "pkg:npm/chalk-figlet",
"ecosystem": "npm"
},
"versions": [
"1.2.0"
],
"database_specific": {
"cwes": [
{
"name": "Embedded Malicious Code",
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature."
}
],
"source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chalk-figlet/MAL-2026-17223.json",
"indicators": {
"evidence_files": [
{
"path": "index.js",
"tlsh": "d931fe8669f6313501b725d9f25be0072257e310314ac6d0e59e97a60fca508fee3ecd",
"sha256": "0825f0ea583c100b4e253aed1964babbfadd823c4458c33ec8161fd262305393"
}
],
"package_integrity": [
{
"hashes": {
"sha1": "840b1a1218ceedd95dcc497659062dcbbe4a9145",
"sha512_sri": "sha512-VJBakeAJPhMCm51AV9AFnIIj3bTa8K7ptLSAijR40GU89b7CMKD8Dlf5Pf2GGr472MNzIJw3JuTMaQNF1eIUSg=="
},
"filename": "chalk-figlet-1.2.0.tgz"
}
]
}
}
}
]Publisher severity
No explicit severity was provided.
- Event
- #23572 · Revision 1
- Added to Heist Feed
- Publisher date