{"id":"GHSA-62ch-8vmq-8xm7","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.","aliases":["CVE-2026-96780"],"modified":"2026-10-02T23:01:22.706221290Z","published":"2026-10-02T22:39:16Z","database_specific":{"github_reviewed_at":"2026-10-02T22:39:16Z","nvd_published_at":"2026-10-01T21:17:26Z","cwe_ids":["CWE-835"],"severity":"HIGH","github_reviewed":true},"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"}],"affected":[{"package":{"name":"figlet","ecosystem":"npm","purl":"pkg:npm/figlet"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.11.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-62ch-8vmq-8xm7/GHSA-62ch-8vmq-8xm7.json"}}],"schema_version":"1.9.0","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"}]}