CVE-2026-56740
Java Analyse et atténuation des vulnérabilités

Aperçu

CVE-2026-56740 is an unauthenticated remote memory exhaustion vulnerability in the JLine3 Telnet server (remote-telnet module) that allows an attacker to crash the host JVM via heap exhaustion. The flaw affects org.jline:jline-remote-telnet versions prior to 4.2.1, with version 4.2.1 being the patched release. It was discovered by Michał Majchrowicz and Marcin Wyczechowski of the AFINE Team and published on June 17, 2026. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).

Détails techniques

The root cause is CWE-400 (Uncontrolled Resource Consumption): TelnetIO.readNEVariables() (lines 1127–1180 of TelnetIO.java) processes incoming Telnet NEW-ENVIRON variable pairs in an unbounded loop, storing each pair in a HashMap held by ConnectionData. While per-variable limits exist (name: max 50 chars, value: max 1000 chars), there is no cap on the total number of variables per connection. The backing HashMap is initialized with a capacity of 20 and no maximum size (ConnectionData.java:98). Each map entry consumes approximately 2 KB of heap; on a 512 MB JVM, roughly 250,000 unique entries trigger an OutOfMemoryError. Critically, NEW-ENVIRON negotiation occurs before authentication, so no credentials are required to exploit this flaw (GitHub Advisory, GHSA).

Impact

Successful exploitation causes a Denial of Service via JVM heap exhaustion (OutOfMemoryError), crashing the host process or severely degrading all services sharing that JVM instance. A single unauthenticated connection sending approximately 3–4 MB of crafted Telnet traffic is sufficient to exhaust a 512 MB JVM heap, affecting all users of any application embedding the jline-remote-telnet module. There is no confidentiality or integrity impact; the vulnerability is purely an availability risk (GitHub Advisory).

Étapes d’exploitation

  1. Reconnaissance: Identify services exposing the JLine3 Telnet server (default Telnet port 23 or custom port) using network scanners such as Nmap or Shodan, targeting applications using org.jline:jline-remote-telnet < 4.2.1.
  2. Establish Telnet connection: Connect to the target Telnet server and complete standard Telnet option negotiation (IAC DO NEW-ENVIRON, IAC WILL NEW-ENVIRON).
  3. Trigger NEW-ENVIRON negotiation: Wait for or solicit the server's IAC SB NEW-ENVIRON SEND IAC SE subnegotiation request.
  4. Send malicious IS subnegotiation: Respond with a crafted IAC SB NEW-ENVIRON IS message containing a large number of unique variable pairs (e.g., sequential 1-byte names \x01, \x02, ... with 1-byte values), withholding the terminating IAC SE until all pairs are sent. Each pair requires ~13 protocol bytes; 250,000 pairs (~3.25 MB) are sufficient to exhaust a 512 MB JVM heap.
  5. Trigger OOM: Send the final IAC SE byte. The server's connection thread, which has been blocking on socket reads while accumulating entries into the unbounded HashMap, triggers an OutOfMemoryError, crashing the JVM or causing severe degradation for all co-hosted services (GitHub Advisory).

Indicateurs de compromis

  • Network: Unusually large Telnet subnegotiation payloads (multi-megabyte IAC SB NEW-ENVIRON IS messages) from a single source IP; high-volume Telnet connections that remain open for extended periods without completing login.
  • Logs: JVM crash logs or java.lang.OutOfMemoryError entries in application logs, particularly referencing heap space exhaustion; sudden process termination of the Java application hosting the Telnet server.
  • Process: Abnormal JVM memory usage growth correlated with an active Telnet connection; JVM GC logs showing continuous full GC cycles with no heap recovery prior to crash (GitHub Advisory).

Atténuation et solutions de contournement

Upgrade org.jline:jline-remote-telnet to version 4.2.1 or later, which is the patched release addressing this vulnerability. If an immediate upgrade is not feasible, consider restricting network access to the Telnet server port using firewall rules to trusted IP ranges, or disabling the remote-telnet module entirely if it is not required. No official configuration-based workaround short of network-level access control has been documented (GitHub Advisory, GHSA).

Réactions de la communauté

The vulnerability was credited to Michał Majchrowicz and Marcin Wyczechowski of the AFINE Team, and the advisory was published by JLine3 maintainer gnodet on June 17, 2026. No significant broader media coverage, vendor statements beyond the advisory, or notable social media commentary has been identified at this time (GitHub Advisory).

Ressources additionnelles


SourceCe rapport a été généré à l’aide de l’IA

Apparenté Java Vulnérabilités:

Identifiant CVE

Sévérité

Score

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

CVE-2026-56741HIGH7.5
  • Java logoJava
  • jline2
NonOuiJul 17, 2026
CVE-2026-56740HIGH7.5
  • Java logoJava
  • org.jline:jline-remote-telnet
NonOuiJul 17, 2026
CVE-2026-49485HIGH7.5
  • Java logoJava
  • ca.uhn.hapi.fhir:org.hl7.fhir.dstu2
NonOuiJul 17, 2026
CVE-2026-44891HIGH7.5
  • Java logoJava
  • tez
NonOuiJul 17, 2026
CVE-2026-45799HIGH7.5
  • Java logoJava
  • com.squareup.wire:wire-runtime
NonOuiJul 17, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité dans le cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité pour évaluer votre niveau de risque et identifier les failles dans vos défenses.

Demander une évaluation

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités