Bug 2588086 (CVE-2026-141380)

Summary: CVE-2026-141380 telnet: telnet: Privilege escalation via environment variable injection
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: akhatavk, aos-team-art-private, asdas, dpaolell, jdelft, jupierce, lgarciaa, mbiarnes, ppalepu, ppostler, prdhamdh, rhel-process-autobot, security-response-team, sghai, sidsharm, suppawar, vlaad, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in telnet. A remote, unauthenticated attacker can bypass environment variable validation during initial session negotiation to inject arbitrary environment variables into the daemon process. These manipulated environment variables are inherited by child authentication processes, which may allow an attacker to escalate privileges or execute arbitrary commands on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Deadline: 2026-12-01   

Description OSIDB Bzimport 2026-12-01 17:27:26 UTC
Debian's patch series builds netkit telnetd with -DACCEPT_USERVAR. Patch 124-support_uservar.diff modifies the NEW-ENVIRON suboption handler in suboption() (telnetd/state.c) so that any variable the CLIENT marks as USERVAR is accepted and setenv()'d:
   if (envvarok(varp) || is_uservar) setenv(...);

The client fully controls the is_uservar flag, so the envvarok() whitelist is bypassed. A remote, unauthenticated attacker can set arbitrary environment variables in the daemon process during the initial option negotiation, before startslave() forks the login child. The forked child inherits the poisoned environment, and the setuid-root telnetlogin wrapper forwards it verbatim to /bin/login (execve(_PATH_LOGIN, argv, envs) with envs = environ); it validates only the values of TERM and REMOTEHOST.