CVE-2026-77420
JLine: ReDoS via `HISTORY_IGNORE` Configuration Variable
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, DefaultHistory.matchPatterns(String patterns, String line) in reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java converts the HISTORY_IGNORE configuration value into a Java regular expression while escaping only part of its syntax, allowing other regex metacharacters to reach the backtracking engine. An attacker who can control application or user configuration can supply a nested-quantifier expression that is reevaluated whenever a command is added to history, consuming excessive CPU and indefinitely blocking the reader thread. This issue is fixed in versions 3.30.15 and 4.3.1.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
5.5
JLine: ReDoS via `HISTORY_IGNORE` Configuration Variable
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, DefaultHistory.matchPatterns(String patterns, String line) in reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java converts the HISTORY_IGNORE configuration value into a Java regular expression while escaping only part of its syntax, allowing other regex metacharacters to reach the backtracking engine. An attacker who can control application or user configuration can supply a nested-quantifier expression that is reevaluated whenever a command is added to history, consuming excessive CPU and indefinitely blocking the reader thread. This issue is fixed in versions 3.30.15 and 4.3.1.
- Record
CVE-2026-77420- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
EUVDEUVD-2026-85528
5.5
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, DefaultHistory.matchPatterns(String patterns, String line) in reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java converts the HISTORY_IGNORE configuration value into a Java regular expression while escaping only part of its syntax, allowing other regex metacharacters to reach the backtracking engine. An attacker who can control application or user configuration can supply a nested-quantifier expression that is reevaluated whenever a command is added to history, consuming excessive CPU and indefinitely blocking the reader thread. This issue is fixed in versions 3.30.15 and 4.3.1.
- Record
EUVD-2026-85528- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5q95-hrpc-m3w3
5.5
JLine: ReDoS via `HISTORY_IGNORE` Configuration Variable
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.
- Record
GHSA-5q95-hrpc-m3w3- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
NVD
5.5
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, DefaultHistory.matchPatterns(String patterns, String line) in reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java converts the HISTORY_IGNORE configuration value into a Java regular expression while escaping only part of its syntax, allowing other regex metacharacters to reach the backtracking engine. An attacker who can control application or user configuration can supply a nested-quantifier expression that is reevaluated whenever a command is added to history, consuming excessive CPU and indefinitely blocking the reader thread. This issue is fixed in versions 3.30.15 and 4.3.1.
- Record
CVE-2026-77420- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSV
5.5
JLine: ReDoS via `HISTORY_IGNORE` Configuration Variable
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, DefaultHistory.matchPatterns(String patterns, String line) in reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java converts the HISTORY_IGNORE configuration value into a Java regular expression while escaping only part of its syntax, allowing other regex metacharacters to reach the backtracking engine. An attacker who can control application or user configuration can supply a nested-quantifier expression that is reevaluated whenever a command is added to history, consuming excessive CPU and indefinitely blocking the reader thread. This issue is fixed in versions 3.30.15 and 4.3.1.
- Record
CVE-2026-77420- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-77420
5.5
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, DefaultHistory.matchPatterns(String patterns, String line) in reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java converts the HISTORY_IGNORE configuration value into a Java regular expression while escaping only part of its syntax, allowing other regex metacharacters to reach the backtracking engine. An attacker who can control application or user configuration can supply a nested-quantifier expression that is reevaluated whenever a command is added to history, consuming excessive CPU and indefinitely blocking the reader thread. This issue is fixed in versions 3.30.15 and 4.3.1.
- Record
DEBIAN-CVE-2026-77420- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-5q95-hrpc-m3w3
5.5
JLine: ReDoS via `HISTORY_IGNORE` Configuration Variable
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.
- Record
GHSA-5q95-hrpc-m3w3- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-77420
5.5
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, DefaultHistory.matchPatterns(String patterns, String line) in reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java converts the HISTORY_IGNORE configuration value into a Java regular expression while escaping only part of its syntax, allowing other regex metacharacters to reach the backtracking engine. An attacker who can control application or user configuration can supply a nested-quantifier expression that is reevaluated whenever a command is added to history, consuming excessive CPU and indefinitely blocking the reader thread. This issue is fixed in versions 3.30.15 and 4.3.1.
- Record
UBUNTU-CVE-2026-77420- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
org.jline:jline-readerMaven |
4.0.0 up to 4.3.1 | 4.3.1 |
org.jline:jline-readerMaven |
3.0.0 up to 3.30.15 | 3.30.15 |
jline3Debian:12 |
All versions, plus listed versions 3.3.1-33.3.1-43.3.1-5 |
None known |
jline3Debian:13 |
All versions, plus listed versions 3.3.1-43.3.1-5 |
None known |
jline3Debian:14 |
All versions, plus listed versions 3.3.1-43.3.1-5 |
None known |
org.jline:jline-readerMaven |
4.0.0 up to 4.3.1, plus listed versions 4.0.104.0.114.0.124.0.134.0.14 Show 17 moreShow less4.0.154.0.164.0.24.0.34.0.44.0.54.0.64.0.74.0.84.0.94.1.04.1.14.1.24.1.34.2.04.2.14.3.0 |
4.3.1 |
org.jline:jline-readerMaven |
3.0.0 up to 3.30.15, plus listed versions 3.10.03.11.03.12.03.12.13.13.0 Show 45 moreShow less3.13.13.13.23.13.33.14.03.14.13.15.03.16.03.17.03.17.13.18.03.19.03.2.03.20.03.21.03.22.03.23.03.24.03.24.13.25.03.25.13.26.03.26.13.26.23.26.33.27.03.27.13.28.03.29.03.3.03.3.13.30.03.30.13.30.103.30.113.30.123.30.133.30.143.30.23.30.33.30.43.30.53.30.63.30.73.30.83.30.9 |
3.30.15 |
jlineUbuntu:14.04:LTS |
All versions, plus listed versions 1.0-2 |
None known |
jline2Ubuntu:14.04:LTS |
All versions, plus listed versions 2.11-12.11-2 |
None known |
jlineUbuntu:16.04:LTS |
All versions, plus listed versions 1.0-2 |
None known |
Show 17 moreShow less
| Package | Affected | Fixed |
|---|---|---|
jline2Ubuntu:16.04:LTS |
All versions, plus listed versions 2.11-4 |
None known |
jlineUbuntu:18.04:LTS |
All versions, plus listed versions 1.0-2 |
None known |
jline2Ubuntu:18.04:LTS |
All versions, plus listed versions 2.11-42.12.1-12.14.6-1 |
None known |
jlineUbuntu:20.04:LTS |
All versions, plus listed versions 1.0-2 |
None known |
jline2Ubuntu:20.04:LTS |
All versions, plus listed versions 2.14.6-3 |
None known |
jlineUbuntu:22.04:LTS |
All versions, plus listed versions 1.0-3 |
None known |
jline2Ubuntu:22.04:LTS |
All versions, plus listed versions 2.14.6-4 |
None known |
jline3Ubuntu:22.04:LTS |
All versions, plus listed versions 3.3.1-2 |
None known |
jlineUbuntu:24.04:LTS |
All versions, plus listed versions 1.0-3 |
None known |
jline2Ubuntu:24.04:LTS |
All versions, plus listed versions 2.14.6-5 |
None known |
jline3Ubuntu:24.04:LTS |
All versions, plus listed versions 3.3.1-33.3.1-3ubuntu1 |
None known |
jlineUbuntu:26.10 |
All versions, plus listed versions 1.0-3build1 |
None known |
jline2Ubuntu:26.10 |
All versions, plus listed versions 2.14.6-6 |
None known |
jline3Ubuntu:26.10 |
All versions, plus listed versions 3.3.1-4build13.3.1-5 |
None known |
jlineUbuntu:26.04:LTS |
All versions, plus listed versions 1.0-31.0-3build1 |
None known |
jline2Ubuntu:26.04:LTS |
All versions, plus listed versions 2.14.6-6 |
None known |
jline3Ubuntu:26.04:LTS |
All versions, plus listed versions 3.3.1-43.3.1-4build1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-77420 is a medium vulnerability (CVSS 5.5) in Jline Jline3, published September 23, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.18%, the 7th percentile. Fixed in org.jline:jline-reader 4.3.1.
References
github.com/jline/jline3/security/advisories/GHSA-5q95-hrpc-m3w3
github.com/jline/jline3/pull/2012
github.com/jline/jline3/pull/2018
github.com/jline/jline3/commit/1d5fc3099e77938b971e197211cad2d4fbb17541
github.com/jline/jline3/commit/341ee69ccc57b7733c1b40d6993219b64b3206ae
github.com/jline/jline3/releases/tag/4.3.1
Show 8 moreShow less
github.com/jline/jline3/releases/tag/jline-3.30.15
github.com/advisories/GHSA-5q95-hrpc-m3w3
github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77420.json
nvd.nist.gov/vuln/detail/CVE-2026-77420
security-tracker.debian.org/tracker/CVE-2026-77420
github.com/jline/jline3
ubuntu.com/security/CVE-2026-77420
cve.org/CVERecord?id=CVE-2026-77420
Left out here: 13 versions. The JSON record has them.