Vulnerability
CVE-2026-77422
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.
178 advisories report this vulnerability, across 7 ecosystems.
Advisories in Wolfi
- CGA-2mww-6vgx-h7xq
- CGA-326x-rrph-jcjx
- CGA-43qx-5w9v-5mqh
- CGA-4wwq-vqpj-qf68
- CGA-54rh-g9jf-frx3
- CGA-5v9v-47cm-6cw4
- CGA-5w7p-pvq2-8m3h
- CGA-6q6c-wm4v-qc3j
- CGA-7388-fr7g-7c5p
- CGA-7f2w-h8cv-mrm2
- CGA-7rp4-726j-8mf5
- CGA-85xg-f8hj-xmhq
- CGA-8pq2-xwgg-3rmr
- CGA-9mmv-mv44-6hxq
- CGA-cjm8-3mgm-jr47
- CGA-f4m7-h6x3-2q53
- CGA-g9vv-cm52-h4vc
- CGA-jmr6-wh8v-xmcp
- CGA-jxvc-22x5-85f8
- CGA-m8pj-vqgf-m659
- CGA-mq5v-fm3h-hgjr
- CGA-q3rv-qpqv-4cww
- CGA-r3w6-3wp8-v37v
- CGA-rjxw-3q69-4w5c
- CGA-vjhh-g3mq-p8m6
- CGA-vvcx-rf85-6hpm
- CGA-w3cj-2f9f-hccg
- CGA-x3rv-8f3q-rph9
- CGA-xqh6-9xmm-r6f6
References
- https://github.com/jline/jline3/commit/1d5fc3099e77938b971e197211cad2d4fbb17541
- https://github.com/jline/jline3/commit/341ee69ccc57b7733c1b40d6993219b64b3206ae
- https://github.com/jline/jline3/pull/2012
- https://github.com/jline/jline3/pull/2018
- https://github.com/jline/jline3/releases/tag/4.3.1
- https://github.com/jline/jline3/releases/tag/jline-3.30.15
- https://github.com/jline/jline3/security/advisories/GHSA-r2xf-8xr9-62gw