Skip to main content

JLine CVE-2026-77420

| EUVDEUVD-2026-85528 MEDIUM
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-09-23 https://github.com/jline/jline3 GHSA-5q95-hrpc-m3w3
5.5
CVSS 3.1 · Vendor: https://github.com/jline/jline3
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain ability to set HISTORY_IGNORE config
  2. Delivery
    Inject malicious regex (a+)+b
  3. Exploit
    Enter long non-matching command line
  4. Execution
    matchPatterns() triggers catastrophic backtracking
  5. Impact
    Reader thread hangs at high CPU (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to control the JLine HISTORY_IGNORE variable via user configuration or application settings, and to submit a command line that does not match the crafted pattern so the regex engine backtracks fully. It only affects applications embedding org.jline:jline-reader (versions >=3.0.0 <3.30.15 or >=4.0.0 <4.3.1) that expose HISTORY_IGNORE to untrusted or lower-privileged input; applications that hardcode or do not use HISTORY_IGNORE are not exposed. Impact is limited to denial of service (hung reader thread, high CPU) with no confidentiality or integrity effect, and the attack vector is local (AV:L) requiring low privileges (PR:L).

Impact

This is a low-to-moderate real-world priority. The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, base 5.5) correctly frames it as an availability-only, local, low-privilege issue with no confidentiality or integrity impact - CWE-1333 catastrophic-backtracking ReDoS. Crucially, exploitation is gated on the attacker controlling the HISTORY_IGNORE configuration variable, which is not a typical unauthenticated-network exposure; the vendor advisory itself notes it is 'lower severity than the interactive editor findings because the attacker must control configuration.' A working PoC is published in the GHSA advisory (pattern (a+)+b plus a long non-matching input line reliably hangs the reader thread), so publicly available exploit code exists, but there is no EPSS score, no CISA KEV listing, and no evidence of active exploitation in the provided data. No SSVC decision data is supplied. The signals are internally consistent: local vector, config-dependent, DoS-only, patched - this is a hardening/defense-in-depth fix rather than an urgent emergency, most relevant to applications that let untrusted parties supply JLine configuration.

Exploit ScenarioDerived

An application embedding jline-reader lets users or lower-privileged operators set the HISTORY_IGNORE variable through configuration or application settings. An attacker sets it to a pathological regex such as (a+)+b, then submits a long non-matching command line (e.g. aaaa...x); each history add triggers catastrophic backtracking, pinning the reader thread at 100% CPU and hanging the session. A reproducible PoC is published in the vendor's GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 23, 2026

A crafted HISTORY_IGNORE value can hang a JLine reader session (org.jline:jline-reader) via catastrophic regular-expression backtracking, pinning the reader thread at high CPU each time a command line is written to history. Applications that embed JLine 3.x (>= 3.0.0, < 3.30.15) or 4.x (>= 4.0.0, < 4.3.1) and let HISTORY_IGNORE be set from user configuration or application settings are affected; the impact is limited to denial of service with no confidentiality or integrity effect. The attacker must already be able to control configuration (CVSS vector PR:L, AV:L), so this is a low-to-moderate real-world priority; no public exploit code was identified at time of analysis, although the vendor advisory documents deterministic reproduction steps, and vendor patches shipping the fix are available in 3.30.15 and 4.3.1.

RemediationAI

Vendor-released patches are available: upgrade org.jline:jline-reader to 3.30.15 for the 3.x line or 4.3.1 for the 4.x line, per vendor advisory https://github.com/jline/jline3/security/advisories/GHSA-5q95-hrpc-m3w3. The fix was delivered through upstream PRs https://github.com/jline/jline3/pull/2012 and https://github.com/jline/jline3/pull/2018 (commits 1d5fc3099e77938b971e197211cad2d4fbb17541 and 341ee69ccc57b7733c1b40d6993219b64b3206ae), which escape HISTORY_IGNORE metacharacters and add SafeRegex/RegexTimeoutException guardrails in bundled builtins. If you cannot upgrade immediately, stop treating HISTORY_IGNORE as user-controlled input: hardcode the value in the application, or restrict who can supply it (e.g., only root-owned configuration files) - the trade-off is loss of per-user history filtering flexibility. Alternatively, pre-validate and strip regex metacharacters such as '(' ')' '+' '?' '{' '}' '[' ']' before the value is applied, or apply a short match timeout if you build your own patched copy; the trade-off is that legitimate patterns containing those characters will no longer behave as regexes, and timeout-based handling returns incomplete match results. Because the attack is local (AV:L) and requires low privileges (PR:L), running JLine-based sessions under CPU/resource limits or per-session watchdogs further reduces the blast radius of a hung reader thread but does not remove the underlying defect.

Affected VersionsENISA

jline3 4.0.0, < 4.3.1
jline3 3.0.0, < 3.30.15

Affected Packages

maven org.jline:jline-reader fix: 3.30.15, 4.3.1
euvd jline3_3_0_0 fix: 3.30.15
euvd jline3_4_0_0 fix: 4.3.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in maven, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-1333 (Inefficient Regular Expression Complexity). In reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java, the method matchPatterns() translates the HISTORY_IGNORE glob syntax into a Java regex: ':' becomes an alternation '|' and '*' becomes '.*', while a small set of escape sequences is honored. Every other character - including the regex metacharacters '(', ')', '+', '?', '{', '}', '[' and ']' - is appended verbatim to the pattern string, which is then evaluated with String.matches() (i.e., a full-match anchored Pattern). Because the untrusted text reaches the Java regex engine as live regex syntax, a nested-quantifier pattern such as '(a+)+b' exhibits exponential backtracking when matched against a long non-matching input line like 'aaaaaaaaaaaaaaaaaaaaaaaaaaax', hanging the reader thread at high CPU. The upstream fix stops treating HISTORY_IGNORE content as a regex: characters are escaped (for example via Pattern.quote) and only the intended JLine wildcard ('*') and separator (':') syntax is translated. The related patch series also introduces an org.jline.utils.SafeRegex helper and a RegexTimeoutException that is consumed by builtins such as Commands.history, Less, Nano and PosixCommands.grep to bound match time and return partial results instead of blocking indefinitely - additional hardening for the same class of regex-driven DoS across JLine's bundled utilities.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/jline/jline3) PRIMARY 5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 5.5 MEDIUM

Attacker must control the HISTORY_IGNORE configuration locally (AV:L/PR:L), the backtracking triggers reliably (AC:L), and impact is availability-only DoS with no C/I effect.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 5.5 MEDIUM

Primary rating from Vendor (https://github.com/jline/jline3).

CVSS VectorVendor: https://github.com/jline/jline3

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

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"
  1. At the JLine prompt, enter a long non-matching line:
text
aaaaaaaaaaaaaaaaaaaaaaaaaaax
  1. 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
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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Medium
JLine is a widely-used Java console/terminal input library across many JVM CLI tools
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
Poc
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

48
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.0 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
openSUSE Leap 16.0 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy