Vulnerability in org.jline:jline-builtins (CVE-2026-77422)
Summary
Vulnerability in org.jline:jline-builtins (CVE-2026-77422). Risk of unauthorized operations or information disclosure. Exploitable via grep. Mitigation: upgrade to 3.30.15 or later.
Original description
The description as published by the source.
Summary
The JLine3 built-in grep command wraps the user-supplied regular expression with
.* before compiling it with Java's backtracking regex engine. This amplifies
catastrophic backtracking and allows a short pattern such as (a+)+b to hang the
command thread on non-matching input. In environments that expose the JLine shell to
remote users, this is a denial-of-service issue.
Details
In builtins/src/main/java/org/jline/builtins/PosixCommands.java, the grep
implementation rewrites the user pattern before compilation:
String regex = args.remove(0);
String regexp = regex;
if (opt.isSet("word-regexp")) {
regexp = "\\b" + regexp + "\\b";
}
if (opt.isSet("line-regexp")) {
regexp = "^" + regexp + "$";
} else {
regexp = ".*" + regexp + ".*";
}
The transformed pattern is compiled with Pattern.compile(...) and then used to test
each input line. For a payload such as (a+)+b, the automatic .* prefix and suffix
increase the backtracking search space substantially.
Affected source location:
builtins/src/main/java/org/jline/builtins/PosixCommands.javagrep(...)
PoC
- Create a file containing a long run of
acharacters:
printf 'aaaaaaaaaaaaaaaaaaaaaaa\n' > /tmp/testfile.txt
- Run JLine3's built-in
grepagainst that file:
grep '(a+)+b' /tmp/testfile.txt
Expected result:
- The command stops responding.
- The executing thread consumes high CPU.
Reproduction environment:
- JLine3 on x86_64 Linux
- O…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-77422 has been found in org.jline:jline-builtins.
Attackers can target a specific entry point like grep over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 7.5/10.
What to do: upgrade org.jline:jline-builtins to 3.30.15 or later.
If unsure, ask your IT team or search "org.jline:jline-builtins CVE-2026-77422" on the vendor's site.
CVE-2026-77422 (org.jline:jline-builtins) — CWE-1333 / CVSS v3 7.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: grep
Patched: 3.30.15 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-1333) exists in org.jline:jline-builtins. Attackers reach the vulnerable code path via grep without authentication.
Check the vendor advisory for the affected versions of org.jline:jline-builtins. Attack surface: grep.
Severity: High (CVSS 7.5/10). Risk of unauthorized operations or information disclosure.
Update to 3.30.15.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Audit SBOM/dependencies to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで org.jline:jline-builtins を使っているサービスとバージョンを洗い出す。
-
2Apply patch patch
Upgrade org.jline:jline-builtins to 3.30.15ステージング環境で 3.30.15 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-77422 jline3
- Ubuntu UBUNTU-CVE-2026-77422 jline
References
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com