CVE-2026-77420 is a medium-severity (CVSS 5.5) CWE-1333 vulnerability in org.jline:jline-reader. A fix is available for org.jline:jline-reader — see the affected versions and patch details below.
JLine: ReDoS via `HISTORY_IGNORE` Configuration Variable
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-77420.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-77420 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,415 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.jline:jline-reader☕org.jline:jline-readerReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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:
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.javamatchPatterns(String patterns, String line)
PoC
- Configure
HISTORY_IGNOREto a malicious pattern, for example:
set history-ignore "(a+)+b"
- At the JLine prompt, enter a long non-matching line:
aaaaaaaaaaaaaaaaaaaaaaaaaaax
- 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, but it can still reliably hang a reader session.
Suggested Fix
The safest fix for the current git head is to stop treating arbitrary HISTORY_IGNORE
content as a regex. Instead, escape all characters by default and translate only the
intended JLine wildcard syntax (*) and separator syntax (:).
Suggested patch:
diff --git a/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java b/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
--- a/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
+++ b/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
@@
StringBuilder sb = new StringBuilder();
for (int i = 0; i < patterns.length(); i++) {
char ch = patterns.charAt(i);
if (ch == '\\') {
ch = patterns.charAt(++i);
- sb.append(ch);
+ sb.append(Pattern.quote(Character.toString(ch)));
} else if (ch == ':') {
sb.append('|');
} else if (ch == '*') {
sb.append('.').append('*');
} else {
- sb.append(ch);
+ sb.append(Pattern.quote(Character.toString(ch)));
}
}
return line.matches(sb.toString());
Credits
This issue was identified by Michał Majchrowicz and Marcin Wyczechowski, members of the AFINE Team.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.jline:jline-reader | ≥ 4.0.0&&< 4.3.1 | 4.3.1org.jline:jline-reader:4.3.1 |
| ☕Maven | org.jline:jline-reader | ≥ 3.0.0&&< 3.30.15 | 3.30.15org.jline:jline-reader:3.30.15 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.jline:jline-reader, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.jline:jline-reader to 4.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-77420 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability requires local access to modify the JLine HISTORY_IGNORE configuration variable. An attacker must be able to control application or user-level configuration in order to inject a malicious regular expression. There is no impact on data confidentiality or integrity, and the DoS is confined to the…
If application configuration allows user-supplied values to flow into HISTORY_IGNORE, validate or sanitize those values to reject regular expression metacharacters (e.g., nested quantifiers such as (a+)+) before they reach JLine's history processing.Source: Red Hat security advisory for CVE-2026-77420 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-77420 in your dependencies?
Find it across Maven, including transitive dependencies.