# CVE-2026-77422: JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping

> Attackers can cause denial of service in JLine applications by submitting crafted regular expressions to the built-in grep command, leading to excessive CPU consumption.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Sep 2026
- **Updated:** 24 Sep 2026
- **Also known as:** CLEANSTART-2026-AH69997, CLEANSTART-2026-FW62825, CLEANSTART-2026-IC20744, CLEANSTART-2026-LG94890, CLEANSTART-2026-QX36211, CLEANSTART-2026-YI14989, DEBIAN-CVE-2026-77422, ECHO-0d62-d5f6-97a4, GHSA-r2xf-8xr9-62gw, MINI-22mg-wjf2-98q7, MINI-4rm4-v8jx-cvfg, MINI-4vqp-qwc3-mjw7, MINI-6pv4-49jq-fwxp, MINI-8hx2-rr3j-3vxw, MINI-9j8m-2xhx-8gcv, MINI-9vgq-2cwg-3rw2, MINI-f76q-4g4f-74x9, MINI-mm2f-pc3c-998x, MINI-mxrg-3qgx-725w, MINI-pq78-7cp9-prhx, MINI-pw28-hg3r-7qmv, MINI-qfjq-hwhj-px46, MINI-qvjj-2448-p2m6, MINI-w92q-c7gm-966c, MINI-xhc6-gfjg-x7p8, ROOT-APP-MAVEN-CVE-2026-77422, UBUNTU-CVE-2026-77422

## What is CVE-2026-77422?

CVE-2026-77422 is a high-severity denial of service vulnerability in jline3, published on 23 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2026-77422?

4 open source packages ship an affected version, including org.jline:jline-builtins.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.jline:jline-builtins` | Maven | From 3.0.0 | 3.30.15 |
| `org.jline:jline-builtins` | Maven | From 3.0.0 | 3.30.15 |
| `org.jline:jline-builtins` | Maven | From 4.0.0 | 4.3.1 |
| `org.jline:jline-builtins` | Maven | From 4.0.0 | 4.3.1 |

## How do I fix CVE-2026-77422?

Upgrade org.jline:jline-builtins to a fixed version for your release line: 3.30.15 or 4.3.1.

## Is CVE-2026-77422 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-77422 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-77422 and fix it if it is affected.

What it is: CVE-2026-77422 is a high-severity denial of service vulnerability in jline3, published on 23 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-77422 exists.

Affected packages and fixed versions:
- org.jline:jline-builtins (Maven): affected from 3.0.0; fixed in 3.30.15
- org.jline:jline-builtins (Maven): affected from 3.0.0; fixed in 3.30.15
- org.jline:jline-builtins (Maven): affected from 4.0.0; fixed in 4.3.1
- org.jline:jline-builtins (Maven): affected from 4.0.0; fixed in 4.3.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-77422/ (Markdown: https://insights.sbomify.com/CVE-2026-77422/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-77422
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-77422
- OSV: https://osv.dev/vulnerability/CVE-2026-77422

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-77422/
Summaries are generated and may contain mistakes; the official description above is the record.
