Bug 2588086 (CVE-2026-141380) - CVE-2026-141380 telnet: telnet: Privilege escalation via environment variable injection
Summary: CVE-2026-141380 telnet: telnet: Privilege escalation via environment variable...
Keywords:
Status: NEW
Alias: CVE-2026-141380
Deadline: 2026-12-01
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-12-01 17:27 UTC by OSIDB Bzimport
Modified: 2026-12-02 15:57 UTC (History)
18 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.