maven package report

Is org.jline:jline-reader safe?

1 known vulnerability, worst severity MODERATE.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so maven packages are not covered.


      cvss
      0.0
      medium

      severity band, no base score published

      epss
      not scored

      chance of exploitation in 30 days

      xyz score
      not scored

      CyberXYZ composite out of 10

      fig. 01 — GHSA-5q95-hrpc-m3w3, the advisory selected below

      // 1 advisories

      GHSA-5q95-hrpc-m3w3

      MODERATECVE-2026-77420
      // summary

      The JLine3 HISTORYIGNORE variable is converted into a Java regular expression with only partial escaping. As a result, regex metacharacters other than and : are passed through to the regex engine. A crafted value such as (a+)+b can cause catastrophic backtracking each time a command line is added to history, hanging the reader thread at high CPU.

      // details

      In reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java, matchPatterns() converts HISTORYIGNORE into a regex:

      for (int i = 0; i < patterns.length(); i++) {
          char ch = patterns.charAt(i);
          if (ch == '\\') {
              ch = patterns.charAt(++i);
              sb.append(ch);
          } else if (ch == ':') {
              sb.append('|');
          } else if (ch == '*') {
              sb.append('.').append('*');
          } else {
              sb.append(ch);
          }
      }
      return line.matches(sb.toString());

      This logic translates wildcard syntax but does not escape regex metacharacters such as (, ), +, ?, {, }, [, and ]. Those characters therefore reach the Java regex engine unchanged.

      Affected source location:

      • reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
      • matchPatterns(String patterns, String line)
      // poc
      • Configure HISTORYIGNORE to a malicious pattern, for example:
      set history-ignore "(a+)+b"
      • At the JLine prompt, enter a long non-matching line:
      aaaaaaaaaaaaaaaaaaaaaaaaaaax
      • Press Enter.

      Expected result:

      • The prompt does not return.
      • The reader thread consumes high CPU.

      Reproduction environment:

      • JLine3 on x8664 Linux
      • OpenJDK 25.0.2
      // impact

      This is a denial-of-service vulnerability caused by catastrophic regex backtracking. Applications embedding org.jline:jline-reader are impacted if they allow HISTORYIGNORE to be configured through user configuration or application settings. The issue is lower severity than the interactive editor findings because the attacker must control configuration, but it can still reliably hang a reader session.

      // suggested fix

      The safest fix for the current git head is to stop treating arbitrary HISTORYIGNORE content as a regex. Instead, escape all characters by default and translate only the intended JLine wildcard syntax () and separator syntax (:).

      Suggested patch:

      diff --git a/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java b/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
      --- a/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
      +++ b/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
      @@
               StringBuilder sb = new StringBuilder();
               for (int i = 0; i < patterns.length(); i++) {
                   char ch = patterns.charAt(i);
                   if (ch == '\\') {
                       ch = patterns.charAt(++i);
      -                sb.append(ch);
      +                sb.append(Pattern.quote(Character.toString(ch)));
                   } else if (ch == ':') {
                       sb.append('|');
                   } else if (ch == '*') {
                       sb.append('.').append('*');
                   } else {
      -                sb.append(ch);
      +                sb.append(Pattern.quote(Character.toString(ch)));
                   }
               }
               return line.matches(sb.toString());
      // credits

      This issue was identified by Michał Majchrowicz and Marcin Wyczechowski, members of the AFINE Team.

      // cvss v3.1 vector

      CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

      Attack vector
      Local
      Attack complexity
      Low
      Privileges required
      Low
      User interaction
      None
      Scope
      Unchanged
      Confidentiality
      None
      Integrity
      None
      Availability
      High

      Checked 2026-09-24 at 08:37 UTC. The most recent advisory here was published 2026-09-23. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.
      Is org.jline:jline-reader safe? maven package security report | CyberXYZ