CVE-2026-56740

JLine: Unauthenticated Remote Memory Exhaustion via Unbounded Telnet NEW-ENVIRON Variables

Published Jul 17, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
JLine is a Java library for handling console input. Prior to 3.30.14, 4.0.16, and 4.2.1, the JLine3 Telnet server remote-telnet module does not limit the number of environment variables a client may inject via the Telnet NEW-ENVIRON option, and TelnetIO.readNEVariables() in TelnetIO.java:1127-1180 stores each variable pair in a HashMap held by ConnectionData, allowing an unauthenticated attacker to flood unique variable pairs before the terminating IAC SE byte and exhaust JVM heap memory with an OutOfMemoryError. This issue is fixed in versions 3.30.14, 4.0.16, and 4.2.1.

Analysis

AI-generated

Technical impact

JLine provides telnet support for Java applications. The Telnet server component parses the NEW-ENVIRON option without limiting the number of environment variable pairs an attacker can inject. Prior to releases 3.30.14, 4.0.16, and 4.2.1, the TelnetIO.readNEVariables() method stores each pair in a HashMap held by ConnectionData, allowing an unauthenticated remote user to supply thousands of unique variables before the terminating IAC SE byte. This can exhaust the JVM heap and trigger an OutOfMemoryError, causing the process to crash and the service to become unavailable.

Affected Systems

Any software that embeds JLine (jline:jline3) and uses its Telnet server module before the patched releases is affected. That includes legacy Java applications, custom console tools, or any remote console service that relies on JLine telnet functionality. The vulnerability is not tied to a specific vendor or product beyond the library itself.

Risk and Exploitability

The CVSS base score of 7.5 indicates a high impact, but the EPSS score of <1% and lack of a CISA KEV listing suggest exploitation is unlikely in the wild. An attacker could connect to the exposed Telnet service, send an unlimited number of NEW-ENVIRON variable pairs, and trigger heap exhaustion without authentication. If successful, the target process would terminate or become unresponsive, leading to a denial‑of‑service condition for all users of the service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade JLine to one of the patched releases: 3.30.14, 4.0.16, or 4.2.1.
  • Disable or remove the Telnet server module if it is not required.
  • Monitor heap usage and configure the application to restart or clear memory upon OutOfMemoryError.

Generated by OpenCVE AI on July 30, 2026 at 23:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-47qp-hqvx-6r3f JLine3 Telnet server: Unauthenticated Remote Memory Exhaustion via Unbounded Telnet NEW-ENVIRON Variables
History
Type Values Removed Values Added
CPEs cpe:2.3:a:jline:jline:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Jline
Jline jline
Vendors & Products Jline
Jline jline
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description JLine is a Java library for handling console input. Prior to 3.30.14, 4.0.16, and 4.2.1, the JLine3 Telnet server remote-telnet module does not limit the number of environment variables a client may inject via the Telnet NEW-ENVIRON option, and TelnetIO.readNEVariables() in TelnetIO.java:1127-1180 stores each variable pair in a HashMap held by ConnectionData, allowing an unauthenticated attacker to flood unique variable pairs before the terminating IAC SE byte and exhaust JVM heap memory with an OutOfMemoryError. This issue is fixed in versions 3.30.14, 4.0.16, and 4.2.1.
Title JLine: Unauthenticated Remote Memory Exhaustion via Unbounded Telnet NEW-ENVIRON Variables
Weaknesses CWE-400
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 20, 2026, 1:58 PM
Reserved
Jun 22, 2026, 7:17 PM
Status
Analyzed
Published
Jul 17, 2026, 10:17 PM
Modified
Oct 24, 2026, 8:10 PM