mediumCVSS 5.5Vulnerability

CVE-2026-77420

### Summary The JLine3 `HISTORY_IGNORE` variable is converted into a Java regular expression with only partial escaping. As a result, regex metacharacters other than `*` and `:` are passed through to the regex engine. A crafted value such as `(a+)+b` can cause catastrophic backtracking each time a command line is added to history, hanging the reader thread at high CPU. ### Details In `reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java`, `matchPatterns()` converts `HISTORY_IGNORE` into a regex: ```java for (int i = 0; i < patterns.length(); i++) { char ch = patterns.charAt(i); if (ch == '\\') { ch = patterns.charAt(++i); sb.append(ch); } else if (ch == ':') { sb.append('|'); } else if (ch == '*') { sb.append('.').append('*'); } else { sb.append(ch); } } return line.matches(sb.toString()); ``` This logic translates wildcard syntax but does not escape regex metacharacters such as `(`, `)`, `+`, `?`, `{`, `}`, `[`, and `]`. Those characters therefore reach the Java regex engine unchanged. Affected source location: - `reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java` - `matchPatterns(String patterns, String line)` ### PoC 1. Configure `HISTORY_IGNORE` to a malicious pattern, for example: ```sh set history-ignore "(a+)+b" ``` 2. At the JLine prompt, enter a long non-matching line: ```text aaaaaaaaaaaaaaaaaaaaaaaaaaax ``` 3. Press Enter. Expected result: - The prompt does not return. - The reader thread consumes high CPU. Reproduction environment: - JLine3 on x86_64 Linux - OpenJDK 25.0.2 ### Impact This is a denial-of-service vulnerability caused by catastrophic regex backtracking. Applications embedding `org.jline:jline-reader` are impacted if they allow `HISTORY_IGNORE` to be configured through user configuration or application settings. The issue is lower severity than the interactive editor findings because the attacker must control configuration,

Properties

ghsa_id
GHSA-5q95-hrpc-m3w3
severity
medium
summary
JLine: ReDoS via `HISTORY_IGNORE` Configuration Variable
cvss_score
5.5
cve_id
CVE-2026-77420
cvss_vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
signal_observed_at
2026-09-23T22:45:22+00:00
is_ghsa_only
false
ghsa_published
2026-09-23T18:12:05Z
source_url
https://github.com/advisories/GHSA-5q95-hrpc-m3w3
ghsa_updated
2026-09-23T18:12:06Z

Related Entities (4)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]maven/org.jline:jline-reader

AFFECTS (1)

[Software]maven/org.jline:jline-reader

HAS_WEAKNESS (1)

[Weakness]Inefficient Regular Expression Complexity

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-77420 (CVSS 5.5) — Ninja Signal Threat Intelligence | Ninja Signal