{"id":"CVE-2026-77422","aliases":["DEBIAN-CVE-2026-77422","EUVD-2026-85527","GHSA-r2xf-8xr9-62gw","ROOT-APP-MAVEN-CVE-2026-77422","UBUNTU-CVE-2026-77422"],"status":"published","title":"JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00595,"percentile":0.48754,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1333"],"published":"2026-09-23T18:09:32Z","modified":"2026-10-28T11:00:37Z","fixes":[{"ecosystem":"Maven","package":"org.jline:jline-builtins","fixed_in":["4.3.1","3.30.15"],"sources":["ghsa","osv"]},{"ecosystem":"Root:Maven","package":"org.jline:jline-builtins","fixed_in":["3.25.1-aikido.3","3.25.1-aikido.4"],"sources":["osv"]},{"ecosystem":"Root:Maven","package":"io.root.org.jline:jline-builtins","fixed_in":["3.25.1-root.io.3","3.25.1-root.io.4"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.jline:jline-builtins","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"4.3.1"}]}]},{"source":"ghsa","ecosystem":"Maven","package":"org.jline:jline-builtins","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.30.15"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"jline3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.1-3","3.3.1-4","3.3.1-5"]},{"source":"osv","ecosystem":"Debian:13","package":"jline3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.1-4","3.3.1-5"]},{"source":"osv","ecosystem":"Debian:14","package":"jline3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.1-4","3.3.1-5"]},{"source":"osv","ecosystem":"Maven","package":"org.jline:jline-builtins","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"4.3.1"}]}],"versions":["4.0.0","4.0.10","4.0.11","4.0.12","4.0.13","4.0.14","4.0.15","4.0.16","4.0.2","4.0.3","4.0.4","4.0.5","4.0.6","4.0.7","4.0.8","4.0.9","4.1.0","4.1.1","4.1.2","4.1.3","4.2.0","4.2.1","4.3.0"]},{"source":"osv","ecosystem":"Maven","package":"org.jline:jline-builtins","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.30.15"}]}],"versions":["3.10.0","3.11.0","3.12.0","3.12.1","3.13.0","3.13.1","3.13.2","3.13.3","3.14.0","3.14.1","3.15.0","3.16.0","3.17.0","3.17.1","3.18.0","3.19.0","3.2.0","3.20.0","3.21.0","3.22.0","3.23.0","3.24.0","3.24.1","3.25.0","3.25.1","3.26.0","3.26.1","3.26.2","3.26.3","3.27.0","3.27.1","3.28.0","3.29.0","3.3.0","3.3.1","3.30.0","3.30.1","3.30.10","3.30.11","3.30.12","3.30.13","3.30.14","3.30.2","3.30.3","3.30.4","3.30.5","3.30.6","3.30.7","3.30.8","3.30.9","3.4.0","3.5.0","3.5.1","3.5.2","3.6.0","3.6.1","3.6.2","3.7.0","3.7.1","3.8.0","3.8.1","3.8.2","3.9.0"]},{"source":"osv","ecosystem":"Root:Maven","package":"org.jline:jline-builtins","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.25.1-aikido.3"},{"fixed":"3.25.1-aikido.4"}]}]},{"source":"osv","ecosystem":"Root:Maven","package":"io.root.org.jline:jline-builtins","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.25.1-root.io.3"},{"fixed":"3.25.1-root.io.4"}]}]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-2"]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.11-1","2.11-2"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-2"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.11-4"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.11-4","2.12.1-1","2.14.6-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.6-3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.6-4"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"jline3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.1-2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-3"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.6-5"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"jline3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.1-3","3.3.1-3ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-3build1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.6-6"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"jline3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.1-4build1","3.3.1-5"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"jline","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0-3","1.0-3build1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"jline2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.6-6"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"jline3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.1-4","3.3.1-4build1"]}],"products":[{"vendor":"jline","product":"jline3"}],"references":[{"url":"https://github.com/jline/jline3/security/advisories/GHSA-r2xf-8xr9-62gw","tags":["x_refsource_CONFIRM","exploit","advisory","web","report"]},{"url":"https://github.com/jline/jline3/pull/2012","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/jline/jline3/pull/2018","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/jline/jline3/commit/1d5fc3099e77938b971e197211cad2d4fbb17541","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/jline/jline3/commit/341ee69ccc57b7733c1b40d6993219b64b3206ae","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/jline/jline3/releases/tag/4.3.1","tags":["x_refsource_MISC","web","report"]},{"url":"https://github.com/jline/jline3/releases/tag/jline-3.30.15","tags":["x_refsource_MISC","web","report"]},{"url":"https://github.com/advisories/GHSA-r2xf-8xr9-62gw"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77422.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77422","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-77422","tags":["advisory"]},{"url":"https://github.com/jline/jline3","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2026-77422","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-77422","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-77422","title":"JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping","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.","status":"published","published":"2026-09-23T18:09:32.308Z","modified":"2026-09-24T14:13:39.588Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:20:15.712761Z"}],"euvd":[{"id":"EUVD-2026-85527","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.","status":"published","published":"2026-09-23T18:09:32Z","modified":"2026-09-24T14:13:39Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T17:27:58.638653Z"}],"ghsa":[{"id":"GHSA-r2xf-8xr9-62gw","title":"JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping","description":"### Summary\n\nThe JLine3 built-in `grep` command wraps the user-supplied regular expression with\n`.*` before compiling it with Java's backtracking regex engine. This amplifies\ncatastrophic backtracking and allows a short pattern such as `(a+)+b` to hang the\ncommand thread on non-matching input. In environments that expose the JLine shell to\nremote users, this is a denial-of-service issue.\n\n### Details\n\nIn `builtins/src/main/java/org/jline/builtins/PosixCommands.java`, the grep\nimplementation rewrites the user pattern before compilation:\n\n```java\nString regex = args.remove(0);\nString regexp = regex;\nif (opt.isSet(\"word-regexp\")) {\n    regexp = \"\\\\b\" + regexp + \"\\\\b\";\n}\nif (opt.isSet(\"line-regexp\")) {\n    regexp = \"^\" + regexp + \"$\";\n} else {\n    regexp = \".*\" + regexp + \".*\";\n}\n```\n\nThe transformed pattern is compiled with `Pattern.compile(...)` and then used to test\neach input line. For a payload such as `(a+)+b`, the automatic `.*` prefix and suffix\nincrease the backtracking search space substantially.\n\nAffected source location:\n- `builtins/src/main/java/org/jline/builtins/PosixCommands.java`\n- `grep(...)`\n\n### PoC\n\n1. Create a file containing a long run of `a` characters:\n\n```sh\nprintf 'aaaaaaaaaaaaaaaaaaaaaaa\\n' \u003e /tmp/testfile.txt\n```\n\n2. Run JLine3's built-in `grep` against that file:\n\n```sh\ngrep '(a+)+b' /tmp/testfile.txt\n```\n\nExpected result:\n- The command stops responding.\n- The executing thread consumes high CPU.\n\nReproduction environment:\n- JLine3 on x86_64 Linux\n- OpenJDK 25.0.2\n\n### Impact\n\nThis is a denial-of-service vulnerability caused by catastrophic regex backtracking.\nAny application embedding `org.jline:jline-builtins` and exposing the built-in `grep`\ncommand is impacted. In remote shell deployments, an attacker can occupy a worker\nthread indefinitely and repeat the attack across multiple sessions to reduce service\navailability for other users.\n\n### Suggested Fix\n\nThe preferred fix for the current git head is:\n- stop rewriting non-line-regexp searches as `.*...*`\n- use `Matcher.find()` for substring semantics\n- compile user patterns with a linear-time engine such as RE2/J\n\nSuggested patch:\n\n```diff\ndiff --git a/builtins/pom.xml b/builtins/pom.xml\n--- a/builtins/pom.xml\n+++ b/builtins/pom.xml\n@@\n         \u003cdependency\u003e\n+            \u003cgroupId\u003ecom.google.re2j\u003c/groupId\u003e\n+            \u003cartifactId\u003ere2j\u003c/artifactId\u003e\n+            \u003cversion\u003e1.8\u003c/version\u003e\n+        \u003c/dependency\u003e\n+        \u003cdependency\u003e\n             \u003cgroupId\u003eorg.jline\u003c/groupId\u003e\n             \u003cartifactId\u003ejline-reader\u003c/artifactId\u003e\n         \u003c/dependency\u003e\n\ndiff --git a/builtins/src/main/java/org/jline/builtins/PosixCommands.java b/builtins/src/main/java/org/jline/builtins/PosixCommands.java\n--- a/builtins/src/main/java/org/jline/builtins/PosixCommands.java\n+++ b/builtins/src/main/java/org/jline/builtins/PosixCommands.java\n@@\n-import java.util.regex.Pattern;\n+import com.google.re2j.Pattern;\n@@\n         if (opt.isSet(\"line-regexp\")) {\n             regexp = \"^\" + regexp + \"$\";\n-        } else {\n-            regexp = \".*\" + regexp + \".*\";\n         }\n@@\n-        boolean m = p.matcher(line).matches();\n+        boolean m = opt.isSet(\"line-regexp\")\n+                ? p.matcher(line).matches()\n+                : p.matcher(line).find();\n```\n\n### Credits\n\nThis issue was identified by Michał Majchrowicz and Marcin Wyczechowski, members of the AFINE Team.","status":"published","published":"2026-09-23T18:12:35Z","modified":"2026-09-23T18:12:36Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:41:20.575159Z"}],"nvd":[{"id":"CVE-2026-77422","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.","status":"published","published":"2026-09-23T19:19:15.863Z","modified":"2026-09-30T16:44:39.84Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:12:50.703874Z"}],"osv":[{"id":"CVE-2026-77422","title":"JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping","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.","status":"published","published":"2026-09-23T18:09:32.308Z","modified":"2026-10-28T11:00:37.188288944Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T15:45:17.102988Z"},{"id":"DEBIAN-CVE-2026-77422","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.","status":"published","published":"2026-09-23T19:19:15.863Z","modified":"2026-10-01T08:47:25.519249597Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:46:03.502256Z"},{"id":"GHSA-r2xf-8xr9-62gw","title":"JLine: ReDoS in Built-in grep Command Amplified by Automatic `.*` Wrapping","description":"### Summary\n\nThe JLine3 built-in `grep` command wraps the user-supplied regular expression with\n`.*` before compiling it with Java's backtracking regex engine. This amplifies\ncatastrophic backtracking and allows a short pattern such as `(a+)+b` to hang the\ncommand thread on non-matching input. In environments that expose the JLine shell to\nremote users, this is a denial-of-service issue.\n\n### Details\n\nIn `builtins/src/main/java/org/jline/builtins/PosixCommands.java`, the grep\nimplementation rewrites the user pattern before compilation:\n\n```java\nString regex = args.remove(0);\nString regexp = regex;\nif (opt.isSet(\"word-regexp\")) {\n    regexp = \"\\\\b\" + regexp + \"\\\\b\";\n}\nif (opt.isSet(\"line-regexp\")) {\n    regexp = \"^\" + regexp + \"$\";\n} else {\n    regexp = \".*\" + regexp + \".*\";\n}\n```\n\nThe transformed pattern is compiled with `Pattern.compile(...)` and then used to test\neach input line. For a payload such as `(a+)+b`, the automatic `.*` prefix and suffix\nincrease the backtracking search space substantially.\n\nAffected source location:\n- `builtins/src/main/java/org/jline/builtins/PosixCommands.java`\n- `grep(...)`\n\n### PoC\n\n1. Create a file containing a long run of `a` characters:\n\n```sh\nprintf 'aaaaaaaaaaaaaaaaaaaaaaa\\n' \u003e /tmp/testfile.txt\n```\n\n2. Run JLine3's built-in `grep` against that file:\n\n```sh\ngrep '(a+)+b' /tmp/testfile.txt\n```\n\nExpected result:\n- The command stops responding.\n- The executing thread consumes high CPU.\n\nReproduction environment:\n- JLine3 on x86_64 Linux\n- OpenJDK 25.0.2\n\n### Impact\n\nThis is a denial-of-service vulnerability caused by catastrophic regex backtracking.\nAny application embedding `org.jline:jline-builtins` and exposing the built-in `grep`\ncommand is impacted. In remote shell deployments, an attacker can occupy a worker\nthread indefinitely and repeat the attack across multiple sessions to reduce service\navailability for other users.\n\n### Suggested Fix\n\nThe preferred fix for the current git head is:\n- stop rewriting non-line-regexp searches as `.*...*`\n- use `Matcher.find()` for substring semantics\n- compile user patterns with a linear-time engine such as RE2/J\n\nSuggested patch:\n\n```diff\ndiff --git a/builtins/pom.xml b/builtins/pom.xml\n--- a/builtins/pom.xml\n+++ b/builtins/pom.xml\n@@\n         \u003cdependency\u003e\n+            \u003cgroupId\u003ecom.google.re2j\u003c/groupId\u003e\n+            \u003cartifactId\u003ere2j\u003c/artifactId\u003e\n+            \u003cversion\u003e1.8\u003c/version\u003e\n+        \u003c/dependency\u003e\n+        \u003cdependency\u003e\n             \u003cgroupId\u003eorg.jline\u003c/groupId\u003e\n             \u003cartifactId\u003ejline-reader\u003c/artifactId\u003e\n         \u003c/dependency\u003e\n\ndiff --git a/builtins/src/main/java/org/jline/builtins/PosixCommands.java b/builtins/src/main/java/org/jline/builtins/PosixCommands.java\n--- a/builtins/src/main/java/org/jline/builtins/PosixCommands.java\n+++ b/builtins/src/main/java/org/jline/builtins/PosixCommands.java\n@@\n-import java.util.regex.Pattern;\n+import com.google.re2j.Pattern;\n@@\n         if (opt.isSet(\"line-regexp\")) {\n             regexp = \"^\" + regexp + \"$\";\n-        } else {\n-            regexp = \".*\" + regexp + \".*\";\n         }\n@@\n-        boolean m = p.matcher(line).matches();\n+        boolean m = opt.isSet(\"line-regexp\")\n+                ? p.matcher(line).matches()\n+                : p.matcher(line).find();\n```\n\n### Credits\n\nThis issue was identified by Michał Majchrowicz and Marcin Wyczechowski, members of the AFINE Team.","status":"published","published":"2026-09-23T18:12:35Z","modified":"2026-09-23T18:27:57.505050842Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T15:46:55.122811Z"},{"id":"UBUNTU-CVE-2026-77422","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.","status":"published","published":"2026-09-23T19:19:00Z","modified":"2026-10-17T13:01:08.548773808Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T16:57:18.015985Z"},{"id":"ROOT-APP-MAVEN-CVE-2026-77422","title":"CVE-2026-77422 in org.jline:jline-builtins - Patched by Root","description":"Root has patched CVE-2026-77422 in the org.jline:jline-builtins package for Root:Maven. Multiple fixed versions available.","status":"published","published":"2026-10-01T12:04:23Z","modified":"2026-10-01T13:15:03.221614739Z","updated_at":"2026-11-02T15:53:27.066589Z"}]}}
