Skip to content
DayZeroHub
High Not yet writtenCVSS 7.5GHSA-2v9w-34q6-wpqxCVE-2026-77423

CVE-2026-77423: jline3 leads to ReDoS in Built-in Less Viewer Search

org.jline:jline-builtins

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-77423: high-severity vulnerability (CVSS 7.5) in org.jline:jline-builtins.

What happened

Original description from the source: ### Summary The JLine3 built-in `less` pager compiles user-supplied search patterns directly as Java regular expressions with no sanitization, timeout, or backtracking bound. A malicious pattern such as `(a+)+b` can trigger catastrophic backtracking and hang the session thread at 100% CPU. In deployments that expose `less` over Telnet or SSH, this becomes a denial-of-service issue for the affected session and can be used to exhaust a bounded session pool. ### Details `Less.getPattern()` in `builtins/src/main/java/org/jline/builtins/Less.java` compiles the user-controlled search string directly with `Pattern.compile()`: ```java private Pattern getPattern(boolean doDisplayPattern) { Pattern compiled = null; String _pattern = doDisplayPattern ? displayPattern : pattern; if (_pattern != null) { boolean insensitive = ignoreCaseAlways || ignoreCaseCond && _pattern.toLowerCase().equals(_pattern); compiled = Pattern.compile( "(" + _pattern + ")", insensitive ? Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE : 0); } return compiled; } ``` The resulting pattern is then applied repeatedly against file content with `compiled.matcher(line).find()` in the `less` search path. Because Java's `java.util.regex` engine is backtracking-based and has no built-in timeout, patterns with nested quantifiers can take exponential time on non-matching input. Affected source locations: - `builtins/src/main/java/org/jline/builtins/Less.java` - `getPattern(boolean doDisplayPattern)` - search callers using `compiled.matcher(line).find()` ### PoC 1. Create a file with a long run of `a` characters: ```sh printf 'aaaaaaaaaaaaaaaaaaaaaaaaa\n' > /tmp/testfile.txt ``` 2. Open the file with the JLine3 `less`…

Why it matters

High severity, CVSS 7.5.

Affected products and versions

org.jline:jline-builtins < 3.30.15 (fixed in 3.30.15); org.jline:jline-builtins >= 4.0.0, < 4.3.1 (fixed in 4.3.1)

ProductVersionsFixed in
org.jline:jline-builtins< 3.30.153.30.15
org.jline:jline-builtins>= 4.0.0, < 4.3.14.3.1

Action recommended by the source

Upgrade to a fixed version: 3.30.15, 4.3.1.

Fixed in: 3.30.15, 4.3.1

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-1333

Relevant change history

  1. Published

    Preliminary advisory published.