Skip to content
Heist/ feed
Unrated

Malicious code in figlet-chalk-render (npm)

Type: advisorySource: OSV1 source record

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (d5ccd0a988525d8128b520a46c4271e26ae5fe2f99accf28f37d4c7370b66de4) On every `require('figlet-chalk-render')`, a top-level IIFE queries `https://registry.npmjs.org/figlet-chalk-render/latest` and, if a newer version exists, spawns `npm install figlet-chalk-render@` with cwd set to `path.join(__dirname, '..', '..')` (the consumer project's root) and stdio ignored. The `https`, `child_process`, and `path` core-module names are loaded via hex-escaped string literals (`'\x63\x68\x69\x6c\x64\x5f\x70\x72\x6f\x63\x65\x73\x73'`, etc.) rather than plain identifiers, deliberately hiding the sensitive requires backing the auto-update. The behavior is undocumented in the README. Every consumer that imports the module receives whatever the latest published version happens to be at that moment, executed with the installer's npm privileges and lifecycle scripts, giving anyone who later controls this package name a silent code-execution channel into every installer's project tree. The hex-obfuscation of the module names is anti-evasion and rebuts a benign-self-update reading: legitimate insecure-update code does not disguise `require('child_process')`.

Announced Group revision 1
Original source ↗

MAL-2026-17226

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-17226

figlet-chalk-render

Source reference: /affected/0/package/name

Affected versions
1.2.1

Source reference: /affected/0/versions

1.0.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": "figlet-chalk-render",
      "purl": "pkg:npm/figlet-chalk-render",
      "ecosystem": "npm"
    },
    "versions": [
      "1.2.1",
      "1.0.0"
    ],
    "database_specific": {
      "cwes": [
        {
          "name": "Embedded Malicious Code",
          "cweId": "CWE-506",
          "description": "The product contains code that appears to be malicious in nature."
        },
        {
          "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/figlet-chalk-render/MAL-2026-17226.json",
      "indicators": {
        "evidence_files": [
          {
            "path": "index.js",
            "tlsh": "0041d006b9fb71310177b0e2a317542a2256e90332c9c2e07b9d9359afca235e5d36dc",
            "sha256": "b07a748c696cdd82d0e1b600e32a8539eedfb6511556c9817770e06d3ac36e61"
          }
        ],
        "package_integrity": [
          {
            "hashes": {
              "sha1": "fb61281c5aa920799c26e5ac55efb0c68cc9970a",
              "sha512_sri": "sha512-47jYuE2NQLtCPLZaXzh2hE6QNXhLojy58//4b3CKvDmWdPaveUVDCAJWLdIwNVtn9VkH7XSO+rxnYiFtSooZAg=="
            },
            "filename": "figlet-chalk-render-1.2.1.tgz"
          }
        ]
      }
    }
  }
]

Publisher severity

No explicit severity was provided.

Event
#36984 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement