
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-133937 is a Regular Expression Denial of Service (ReDoS) vulnerability in highlight.js affecting all versions up to and including 11.12.0. The flaw resides in the hljs.highlight() function within src/languages/livescript.js (the Language Grammar Handler component), where a crafted text input triggers inefficient, superlinear regex backtracking. It was disclosed on November 20, 2026, and carries a CVSS v3.1 base score of 5.3 (Medium) and a CVSS v4.0 base score of 5.5 (Medium) (Github Advisory, Feedly).
The root cause is classified as CWE-400 (Uncontrolled Resource Consumption) and CWE-1333 (Inefficient Regular Expression Complexity). The vulnerable regex in livescript.js at line 285 — /(?![ *])(\.|[^\\\n])*?/[gim](?=\W) — contains an ambiguous alternation (\. and [^\\\n]) where both branches can consume a backslash character, forcing the regex engine to explore exponentially many partitions on failure. Because hljs.highlight() is synchronous and single-threaded, a crafted input of ~40 KB causes the Node.js event loop to stall for approximately 11 seconds, with extrapolated stall times of ~2.1 hours at 1 MB. A minimal public PoC demonstrates quadratic scaling: inputs of 10 KB, 20 KB, and 40 KB produce ~585 ms, ~2,336 ms, and ~10,981 ms respectively — a ×4 increase per input doubling (highlight.js Issue #4529). The same vulnerability class was previously addressed in version 10.4.1 (GHSA-7wwv-vh3v-89cq), but the livescript pattern was present even in that fix release and has persisted through 11.12.0 (highlight.js Issue #4529).
Successful exploitation causes a Denial of Service by exhausting CPU resources on the server or client running highlight.js, stalling the JavaScript event loop and making the application unresponsive for the duration of the regex evaluation. There is no impact on confidentiality or data integrity — the vulnerability is purely an availability issue. Applications that pass untrusted user-supplied text to hljs.highlight() with the LiveScript language grammar are at highest risk, including web-based code editors, documentation platforms, and CI/CD dashboards (Github Advisory, Red Hat Bugzilla).
A public proof-of-concept is available in the GitHub issue report, demonstrating the quadratic scaling with a minimal Node.js script (highlight.js Issue #4529). No in-the-wild exploitation has been observed, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is 0.0, reflecting low current exploitation probability (Feedly). No threat actor attribution is available. The attack requires no authentication, no user interaction, and low complexity — any network-accessible endpoint that passes attacker-controlled text to hljs.highlight() with the livescript grammar is exploitable remotely.
hljs.highlight() with the livescript language grammar (e.g., a code paste service, documentation renderer, or online editor)./ followed by a long sequence of repeated characters (e.g., "/" + "a".repeat(40000)). This triggers the ambiguous alternation in the livescript regex-literal pattern at livescript.js:285.hljs.highlight(text, { language: 'livescript' }).Reference PoC (from public issue):
const hljs = require("highlight.js");
for (const n of [10_000, 20_000, 40_000]) {
const t = process.hrtime.bigint();
hljs.highlight("/" + "a".repeat(n), { language: "livescript" });
console.log(n, Number(process.hrtime.bigint() - t) / 1e6, "ms");
}
// 10000 -> ~585 ms, 20000 -> ~2336 ms, 40000 -> ~10981 mshljs.highlight(), particularly for requests containing large text bodies with livescript-like content (e.g., strings starting with / followed by many repeated characters).No patched release of highlight.js is available yet; a fix pull request (#4575) that rewrites the vulnerable livescript, csharp, and bash regex patterns is pending maintainer acceptance (highlight.js PR #4575). In the interim, the following workarounds are recommended:
hljs.highlight().Monitor the upstream repository for a patched release and upgrade as soon as one is available (highlight.js Issue #4529, Red Hat Bugzilla).
Red Hat has opened a tracking bug (Bugzilla #2579722) and assigned medium severity, with 68 users CC'd indicating broad internal interest across Red Hat product teams (Red Hat Bugzilla). The original researcher (LeoWSY-hashblue) filed a comprehensive audit report covering 15 affected grammars and 17 vulnerable regexes, noting this is a recurring vulnerability class that has been reintroduced multiple times since the 10.4.1 fix, and called for a CI gate using recheck to prevent future regressions (highlight.js Issue #4529). Community contributor Yahiro025 submitted PR #4575 with deterministic regex rewrites for the three most severe cases, and reviewer prkomb provided comparative benchmarks suggesting an alternative fix for the bash pattern (highlight.js PR #4575).
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
highlight.js
devel
highlight.js
focal (esm-apps)
highlight.js
jammy
highlight.js
jammy (esm-apps)
highlight.js
noble
highlight.js
noble (esm-apps)
highlight.js
resolute
highlight.js
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."