Description
JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, the JLine built-in grep command in builtins/src/main/java/org/jline/builtins/PosixCommands.java accepts a user-controlled regular expression in grep(...) and, unless line-regexp mode is used, automatically adds a dot-star prefix and suffix before compiling it with Java's backtracking regular expression engine. The wrapping expands the backtracking search space, so a short nested-quantifier expression evaluated against non-matching input can consume excessive CPU and indefinitely block a command worker, including in remotely exposed shell sessions. This issue is fixed in versions 3.30.15 and 4.3.1.
Published: 2026-09-23
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: ReDoS leading to denial of service
Action: Apply Patch
AI Analysis

Impact

JLine, a Java library for console input handling, contains a regular‑expression denial‑of‑service vulnerability in its built‑in grep command. The command unwraps user‑supplied regexes by automatically adding a dot‑star prefix and suffix unless line‑regex mode is activated. This expansion can cause the Java backtracking regex engine to explore an exponential number of states when processing nested‑quantifier expressions, consuming excessive CPU cycles and blocking the command worker indefinitely. In remote shell sessions that expose the JLine grep functionality, this can lead to a denial of service, preventing further command execution.

Affected Systems

Vendors affected include the JLine project (jline:jline3). The vulnerability exists in all releases from 3.0.0 up to 3.30.15 (exclusive) and any earlier 4.x release prior to 4.3.1. Versions 3.30.15 and 4.3.1 are fixed. Any Java application that incorporates the JLine library's built‑in grep command, such as console or shell interfaces, is potentially impacted.

Risk and Exploitability

The CVSS score of 7.5 indicates substantial severity, but no EPSS data are currently available, so the exact exploitation probability is unknown. The vulnerability has not been listed in the CISA KEV catalog. Exploitation requires an attacker to provide a crafted regex to the grep command; once invoked, the automatic dot‑star wrapping can cause severe CPU exhaustion. If an application exposes JLine’s shell interface to untrusted users, the attack vector is likely remote; otherwise it remains local. The denial of service impact is system‑wide for the affected process, as the command worker is blocked until the expression terminates or the process is killed.

Generated by OpenCVE AI on September 23, 2026 at 20:32 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the JLine library to a fixed version (≥3.30.15 or 4.3.1).
  • If the upgrade cannot immediately be applied, enforce line‑regex mode or sanitize user‑controlled regexes to prevent automatic dot‑star wrapping.
  • Implement resource limits or monitoring on CPU usage for the grep command to mitigate prolonged blocking when the vulnerability must remain in use.

Generated by OpenCVE AI on September 23, 2026 at 20:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-r2xf-8xr9-62gw JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping
History

Sun, 27 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
First Time appeared Jline
Jline jline
Vendors & Products Jline
Jline jline

Fri, 25 Sep 2026 05:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 24 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Wed, 23 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Description JLine is a Java library for handling console input. From 3.0.0 until 3.30.15 and 4.3.1, the JLine built-in grep command in builtins/src/main/java/org/jline/builtins/PosixCommands.java accepts a user-controlled regular expression in grep(...) and, unless line-regexp mode is used, automatically adds a dot-star prefix and suffix before compiling it with Java's backtracking regular expression engine. The wrapping expands the backtracking search space, so a short nested-quantifier expression evaluated against non-matching input can consume excessive CPU and indefinitely block a command worker, including in remotely exposed shell sessions. This issue is fixed in versions 3.30.15 and 4.3.1.
Title JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping
Weaknesses CWE-1333
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-24T14:13:39.588Z

Reserved: 2026-08-20T19:59:59.603Z

Link: CVE-2026-77422

cve-icon Vulnrichment

Updated: 2026-09-24T14:13:17.899Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-23T19:19:15.863

Modified: 2026-09-30T16:44:39.840

Link: CVE-2026-77422

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-23T18:09:32Z

Links: CVE-2026-77422 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-27T11:45:51Z

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity