Skip to main content

highlight.js CVE-2026-133937

| EUVDEUVD-2026-131885 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-11-20 cna@vuldb.com GHSA-cgx4-p4cg-j8rq
5.5
CVSS 4.0 · Vendor: vuldb
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted LiveScript text to highlighter
  2. Exploit
    Grammar regex enters catastrophic backtracking
  3. Impact
    CPU exhaustion stalls request thread (DoS)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application invoke highlight.js on attacker-controlled text AND that this text be processed by the LiveScript grammar in src/languages/livescript.js - i.e. LiveScript is explicitly configured as the highlight language or automatic language detection selects it. The vector is AV:N/AC:L/PR:N/UI:N, so where those conditions hold the trigger is remote and unauthenticated against default configurations, with the single caveat that the input must reach the LiveScript regex. Limiting factors: impact is availability-only (VA:L, CPU/time exhaustion, no code execution or data exposure); applications that restrict highlighting to a fixed non-LiveScript language, size-limit input, or run highlighting off the main request thread materially reduce real-world risk. No fixed version is yet released, so mitigation currently depends on these configuration controls rather than an upstream patch.

Impact

This is a regular-expression denial-of-service (ReDoS, CWE-400) in the LiveScript language grammar of highlight.js (≤11.12.0). The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) with only VA:L and VC:N/VI:N correctly frames this as a low-to-moderate availability-only issue, scoring 5.5 - there is no confidentiality or integrity impact, so it is not a critical priority. The signals are internally consistent: the single-impact (availability) CVSS, the CWE-400 classification, and the 'Denial Of Service' tag all agree. Exploit maturity is E:P (Proof of Concept) and the input states an exploit has been published, so public exploit/PoC material exists, but there is no KEV listing and no EPSS value is provided, so there is no evidence of widespread automated exploitation - the vuln.today decision label is 'this_month', not act_now/emergency. The practical risk hinges on a limiting factor not captured by the AV:N score: the vulnerable code path is only reached when an application feeds attacker-controlled text through highlight.js AND that text is processed by the LiveScript grammar (either LiveScript is explicitly selected or auto-detection routes the input there). Note also that no fixed release exists yet - the remediation is a pull request (PR #4575) that still awaits acceptance - which raises exposure duration even though per-incident impact is modest.

Exploit ScenarioDerived

An attacker submits a specially crafted string to a web application or service that passes user-supplied content through highlight.js with LiveScript highlighting (or language auto-detection) enabled - for example a comment field, markdown renderer, or paste/snippet service. The malicious input triggers catastrophic backtracking in the LiveScript regex, pinning a CPU core and stalling the request handler; because highlighting is often synchronous and single-threaded (e.g. Node.js), this can degrade or hang the service. An exploit has reportedly been published, so weaponizing the input requires little original research.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 20, 2026

Regular-expression denial of service in highlight.js through 11.12.0 lets a remote, unauthenticated attacker exhaust CPU time when the LiveScript grammar processes crafted text, but only if that text is actually routed through the LiveScript highlighting path. The assessed impact is availability-only (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L; 5.5 under the reporter's CVSS 4.0 scoring), with no code execution, data exposure, or integrity impact. No CISA KEV listing exists, but a public exploit reference has been published for this flaw and the reporter's vector carries an E:P (proof-of-concept) designation; the fix is an open pull request (highlight.js #4575) that awaits acceptance, so no released patched version is available at time of analysis. Priority is scheduled rather than emergency, and real-world risk drops sharply for applications that pin highlighting to a fixed non-LiveScript language, cap input size, or run highlighting off the main request thread.

RemediationAI

Vendor-released patch status: an upstream fix is available only as pull request https://github.com/highlightjs/highlight.js/pull/4575, which rewrites the LiveScript regex as an unrolled single-pass pattern; that PR awaits acceptance and no patched release version has been published, so a released build number cannot be cited. Until a fixed version ships, the actionable controls are configuration-level and follow the assessed exploitation conditions. First, eliminate the reachable path: call hljs.highlight with an explicit, fixed language argument from an allowlist that excludes livescript, and disable auto-detection (for example by not calling hljs.highlightAuto on untrusted input), accepting the side effect that LiveScript snippets render unhighlighted and that heuristic language guessing is lost for all inputs. Second, bound the work: enforce a maximum input length and, more importantly, run highlighting inside a Worker or other separate thread that can be terminated on a timeout, since the failure mode is CPU/time exhaustion - the trade-off is added engineering complexity and slightly delayed rendering. Third, if the LiveScript grammar must remain available, treat the surrounding request as untrusted and rate-limit or queue highlighting jobs so a single pathological document cannot monopolize a request thread. Monitor the upstream issue and PR for acceptance and the subsequent release, then upgrade to the first published version containing PR #4575 and re-test. Advisory URLs for tracking: https://github.com/highlightjs/highlight.js/issues/4529, https://github.com/highlightjs/highlight.js/pull/4575, https://vuldb.com/vuln/441503.

Affected VersionsENISA

highlight.js 11.9
highlight.js 11.1
highlight.js 11.8
highlight.js 11.7
highlight.js 11.6
highlight.js 11.3
highlight.js 11.10
highlight.js 11.11
highlight.js 11.12.0
highlight.js 11.4
highlight.js 11.0
highlight.js 11.2
highlight.js 11.5

Affected Packages

euvd highlight_js no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

highlight.js is a JavaScript syntax-highlighting library that ships a per-language grammar definition for each supported language; each grammar is a set of regular expressions evaluated over the input text by the JavaScript RegExp engine. CVE-2026-133937 is a CWE-400 uncontrolled-resource-consumption issue realized as regex denial of service (ReDoS) inside src/languages/livescript.js, in the rule that recognizes LiveScript regular-expression literals. The original pattern was written as /\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/, whose alternation between an escaped-pair branch and a single-character branch combined with a lazy quantifier allows the engine to explore combinatorially many ways of partitioning the same input when no closing delimiter matches, producing super-linear backtracking. The upstream pull request #4575 rewrites the rule as an unrolled, single-deterministic-pass expression, /\/(?![ *])(?:[^\\\/\n]|\\.)*?\/[gim]*(?=\W)/, comment-documented as "unrolled so the scan is a single deterministic pass (no backtracking)". The same PR also tightens regexes in src/languages/bash.js (lazy quantifier on the function-declaration rule) and src/languages/csharp.js (raw string literal rule), which suggests the maintainers treated this as a class of grammar-level regex performance defects rather than a single isolated rule. The attacker does not need to supply a valid LiveScript program; any text that reaches this regex without a terminating delimiter is sufficient to drive the pathological scan. Per the independent assessment, the trigger requires the target application to call hljs.highlight on attacker-controlled text AND to select the LiveScript grammar, either by explicit configuration or by highlight.js automatic language detection.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vuldb) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 5.3 MEDIUM

Remotely supplied text reaches the regex with no auth or interaction (AV:N/AC:L/PR:N/UI:N); ReDoS yields availability-only impact (A:L) with no confidentiality or integrity effect and unchanged scope.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (vuldb).

CVSS VectorVendor: vuldb

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

A flaw has been found in highlight highlight.js up to 11.12.0. The affected element is the function hljs.highlight of the file src/languages/livescript.js of the component Language Grammar Handler. Executing a manipulation of the argument text can lead to inefficient regular expression complexity. The attack can be launched remotely. The exploit has been published and may be used. The pull request to fix this issue awaits acceptance.

Threat Intelligence Overview

EPSS Score
0.6%
Top 51% exploitable
Prevalence
Ubiquitous
highlight.js is one of the most widely deployed JS syntax-highlighting libraries
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.6%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
High

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy