CVE-2026-77423: Regular Expression Denial of Service (ReDoS) in JLine Built-in Less Viewer

Vulnerability ID: CVE-2026-77423
CVSS Score: 7.5
Published: 2026-11-23

CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.

TL;DR

JLine versions 3.0.0 through 3.30.14 and 4.0.0 through 4.3.0 contain a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less command. User-supplied search patterns are compiled and executed via java.util.regex without execution time limits, allowing nested quantifier expressions to stall worker threads and exhaust server thread pools. Upgrade to JLine 3.30.15 or 4.3.1 to remediate.

⚠️ Exploit Status: POC

Technical Details

  • CVE ID: CVE-2026-77423 (GHSA-2v9w-34q6-wpqx)
  • Vulnerability Class: CWE-1333: Inefficient Regular Expression Complexity (ReDoS)
  • Affected Component: org.jline.builtins.Less (getPattern / moveToNextMatch / moveToPreviousMatch / toBeDisplayed)
  • CVSS v3.1 Score: 7.5 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
  • EPSS Score: 0.461% (40.76th Percentile)
  • Impact: 100% CPU thread utilization and worker thread pool exhaustion (Denial of Service)
  • Fixed Versions: JLine 3.30.15 and JLine 4.3.1
  • CISA KEV Status: Not Listed

Affected Systems

  • org.jline:jline
  • org.jline:jline-builtins
  • JLine 3.x (3.0.0 through 3.30.14)
  • JLine 4.x (4.0.0 through 4.3.0)
  • JLine (org.jline:jline / org.jline:jline-builtins): >= 3.0.0, < 3.30.15 (Fixed in: 3.30.15)
  • JLine (org.jline:jline / org.jline:jline-builtins): >= 4.0.0, < 4.3.1 (Fixed in: 4.3.1)

Code Analysis

Commit: 1d5fc30

Introduce SafeRegex utility with TimeoutCharSequence to prevent ReDoS in Less and built-in commands (PR #2012)

--- a/builtins/src/main/java/org/jline/builtins/Less.java +++ b/builtins/src/main/java/org/jline/builtins/Less.java @@ -41,6 +41,7 @@ import org.jline.utils.Display; import org.jline.utils.InfoCmp.Capability; import org.jline.utils.NonBlockingReader; +import org.jline.utils.SafeRegex; import org.jline.utils.Status; @@ -1103,7 +1104,7 @@ private void moveToNextMatch(boolean spanFiles) throws IOException { break; } else if (!toBeDisplayed(line, dpCompiled)) { continue; - } else if (compiled.matcher(line).find()) { + } else if (SafeRegex.find(compiled, line)) { display.clear(); firstLineToDisplay = lineNumber; offsetInLine = 0; @@ -1143,7 +1144,7 @@ private void moveToPreviousMatch(boolean spanFiles) throws IOException { break; } else if (!toBeDisplayed(line, dpCompiled)) { continue; - } else if (compiled.matcher(line).find()) { + } else if (SafeRegex.find(compiled, line)) { display.clear(); firstLineToDisplay = lineNumber; offsetInLine = 0; @@ -1317,10 +1318,7 @@ private Pair<Integer, AttributedString> prevLine2display(int line, Pattern dpCom } private boolean toBeDisplayed(AttributedString curLine, Pattern dpCompiled) { - return curLine == null - || dpCompiled == null - || sourceIdx == 0 - || dpCompiled.matcher(curLine).find(); + return curLine == null || dpCompiled == null || sourceIdx == 0 || SafeRegex.find(dpCompiled, curLine); } 

Commit: 341ee69

Backport SafeRegex ReDoS mitigation to jline-3.x branch (PR #2018)

Mitigation Strategies

  • Upgrade JLine library components (org.jline:jline, org.jline:jline-builtins) to patched versions that enforce time-bounded regex evaluation via SafeRegex.
  • Disable or unbind the built-in less pager command in custom JLine command registries if interactive file paging is not required.
  • Restrict network access to remote SSH and Telnet administration consoles powered by JLine and enforce per-user session concurrency limits.

Remediation Steps:

  1. Audit project dependency trees (e.g., via 'mvn dependency:tree' or 'gradle dependencies') to identify direct or transitive inclusions of org.jline:jline or org.jline:jline-builtins.
  2. For applications using JLine 3.x, update the dependency version to 3.30.15 or later.
  3. For applications using JLine 4.x, update the dependency version to 4.3.1 or later.
  4. Rebuild and redeploy the affected Java application or container service, then verify that runaway regex searches inside the less viewer time out gracefully after 1500ms.

References

Read the full report for CVE-2026-77423 on our website for more details including interactive diagrams and full exploit analysis.