FreeBSD telnetd sys_term.c Environment Variable Handling Privilege Escalation (FreeBSD-SA-09:05)

This script is Copyright (C) 2009-2011 Tenable Network Security, Inc.


Synopsis :

The remote telnet server is vulnerable to a code execution attack.

Description :

A flaw in the environment-handling code used by the telnet server
running on the remote host fails to scrub the environment of variables
such as 'LD_PRELOAD' before calling the login program. An attacker
who can place an arbitrary library on the remote host, either as a
local user or remotely through some other means, can leverage this
issue to execute arbitrary code subject to the privileges under which
the service runs, typically 'root'.

See also :

http://security.freebsd.org/advisories/FreeBSD-SA-09:05.telnetd.asc
http://archives.neohapsis.com/archives/bugtraq/2009-02/0152.html

Solution :

Patch or upgrade the affected system as described in the project's
advisory above.

Risk factor :

High / CVSS Base Score : 7.6
(CVSS2#AV:N/AC:H/Au:N/C:C/I:C/A:C)
CVSS Temporal Score : 6.3
(CVSS2#E:F/RL:OF/RC:C)
Public Exploit Available : true

Family: Gain a shell remotely

Nessus Plugin ID: 35700 (freebsd_telnetd_code_exec.nasl)

Bugtraq ID: 33777

CVE ID: CVE-2009-0641