Vulnerability DatabaseCVE-2026-133937

CVE-2026-133937: 
Grafana vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitability

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.

Exploitation steps

  1. Identify a target: Locate a web application or service that uses highlight.js ≤ 11.12.0 and exposes an endpoint that accepts user-supplied text and passes it to hljs.highlight() with the livescript language grammar (e.g., a code paste service, documentation renderer, or online editor).
  2. Craft the adversarial payload: Construct a string beginning with / 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.
  3. Submit the payload: Send the crafted string to the target endpoint via HTTP POST or any input mechanism that routes text to hljs.highlight(text, { language: 'livescript' }).
  4. Observe DoS effect: The synchronous regex evaluation stalls the Node.js event loop for ~11 seconds per 40 KB of input, rendering the service unresponsive. Repeated submissions can sustain the denial of service.

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 ms

(highlight.js Issue #4529)

Indicators of compromise

  • Logs: Unusually long response times or timeouts on endpoints that invoke hljs.highlight(), particularly for requests containing large text bodies with livescript-like content (e.g., strings starting with / followed by many repeated characters).
  • Process: Sustained high CPU usage (near 100%) on the Node.js process serving the application, correlated with specific incoming requests; event loop lag metrics spiking to seconds.
  • Network: HTTP requests to code-highlighting or rendering endpoints with abnormally large payloads (tens of KB) consisting of repetitive character sequences; repeated requests from the same source IP targeting the same endpoint in rapid succession.

Mitigation and workarounds

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:

  • Cap input length: Limit untrusted text to ~10–20 KB before passing it to hljs.highlight().
  • Use a worker with a timeout: Run highlighting in a separate worker thread with a configurable timeout to prevent event loop stalls.
  • Avoid registering affected grammars: If livescript syntax highlighting is not required, unregister or exclude the livescript grammar from the highlight.js build.
  • Rate limiting: Apply rate limiting on endpoints that invoke highlighting to reduce the impact of repeated DoS attempts.

Monitor the upstream repository for a patched release and upgrade as soon as one is available (highlight.js Issue #4529, Red Hat Bugzilla).

Community reactions

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).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

highlight.js

Affected

sid

highlight.js

Affected

trixie

highlight.js

Affected

Ubuntu

Unknown

bionic (esm-apps)

highlight.js

Unknown

devel

highlight.js

Unknown

focal (esm-apps)

highlight.js

Unknown

jammy

highlight.js

Unknown

jammy (esm-apps)

highlight.js

Unknown

noble

highlight.js

Unknown

noble (esm-apps)

highlight.js

Unknown

resolute

highlight.js

Unknown

RHEL / CentOS

Affected

RHEL 8

grafana.src

Affected

RHEL 9

grafana.src

Affected

RHEL 10

grafana.src

Affected

Source: This report was generated using AI

Related Grafana vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-134815CRITICAL9.2
  • Grafana logoGrafana
  • grafana-opentsdb
NoNoNov 22, 2026
CVE-2026-129935MEDIUM6.3
  • Grafana logoGrafana
  • container-tools:rhel8::skopeo.src
NoNoNov 19, 2026
CVE-2026-129934MEDIUM5.7
  • Grafana logoGrafana
  • container-tools:rhel8::podman-tests
NoNoNov 19, 2026
CVE-2026-133937MEDIUM5.5
  • Grafana logoGrafana
  • grafana.src
NoNoNov 20, 2026
CVE-2026-133487LOW2.1
  • Grafana logoGrafana
  • nodejs:26::nodejs-nodemon
NoYesNov 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management