Vulnerabilities in pkg:npm/figlet
PACKAGECVE-2026-96780 is a HIGH denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Figlet libraries in the npm ecosystem. The issue involves figlet is vulnerable to denial of service via unbounded loop when whitespacebreak is used with a small width. Remediation is available by upgrading affected packages to version 1.11.3.
pkg:npm/figlet
Vulnerability advisories affecting package pkg:npm/figlet. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-62ch-8vmq-8xm7 | CVE-2026-96780 | HIGH | figlet is vulnerable to denial of service via unbounded loop when whitespaceBreak is used with a small width |
CVE-2026-96780 at a Glance
How to Fix CVE-2026-96780
To remediate this vulnerability, upgrade all affected Figlet dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install figlet@1.11.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls figlet
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-96780, inspect your project dependencies using npm:
npm ls figlet
Analyze the terminal output to locate any version of Figlet in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.3), your application is affected.
Note: The npm ls figlet command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Figlet, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-96780 Affected Figlet Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
figlet
|
npm |
< 1.11.3
|
1.11.3
|
References
Frequently Asked Questions
What is CVE-2026-96780?
Which Figlet versions are affected?
What version fixes CVE-2026-96780?
Is figlet affected?
What CWE is associated with CVE-2026-96780?
How can I check npm dependencies for CVE-2026-96780?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-62ch-8vmq-8xm7",
"modified" : "2026-10-02T22:39:16Z",
"published" : "2026-10-02T22:39:16Z",
"aliases" : [ "CVE-2026-96780" ],
"summary" : "figlet is vulnerable to denial of service via unbounded loop when whitespaceBreak is used with a small width",
"details" : "### Impact\nA denial-of-service (infinite loop) can occur in `text()` / `textSync()` when\n**both**:\n- `whitespaceBreak: true` is set, **and**\n- `width` is set smaller than the rendered width of a single FIGlet character.\nUnder these conditions `breakWord()` could never find a valid break point, so the\nword-wrapping loop in `generateFigTextLines()` never terminated. This pins a CPU\ncore and grows memory without bound, blocking the Node.js event loop.\n\n### Severity\nLow or Medium. Triggering requires a non-default configuration (`whitespaceBreak: true`) and\nan attacker-controlled `width` value reaching `text()`/`textSync()`. This library is typically\nused with fixed options, where this is not\nreachable. Applications that pass an untrusted `width` together with\n`whitespaceBreak` on a request path are affected.\n\n### Patches\nFixed in **figlet 1.11.3**. `breakWord()` now always makes forward progress\n(emitting an over-wide character on its own line), and FIGlet header parsing now\nrejects invalid values (e.g. zero/negative height).\n\n### Workarounds\nDo not expose `width` to untrusted input, or leave `whitespaceBreak` disabled\n(the default), or upgrade to 1.11.3.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "figlet"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.11.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/patorjk/figlet.js/security/advisories/GHSA-62ch-8vmq-8xm7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-96780"
}, {
"type" : "WEB",
"url" : "https://github.com/patorjk/figlet.js/pull/169"
}, {
"type" : "WEB",
"url" : "https://github.com/patorjk/figlet.js/commit/cb2839d0e53aeafbd361e9587abc72e49e41cbb3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/patorjk/figlet.js"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-02T22:39:16Z",
"nvd_published_at" : "2026-10-01T21:17:26Z"
}
}