FreeBSD : sudo -- arbitrary command execution (1b725079-9ef6-11da-b410-000e0c2e438a)

medium Nessus Plugin ID 21392

Synopsis

The remote FreeBSD host is missing a security-related update.

Description

Tavis Ormandy reports :

The bash shell uses the value of the PS4 environment variable (after expansion) as a prefix for commands run in execution trace mode.
Execution trace mode (xtrace) is normally set via bash's -x command line option or interactively by running 'set -o xtrace'. However, it may also be enabled by placing the string 'xtrace' in the SHELLOPTS environment variable before bash is started.

A malicious user with sudo access to a shell script that uses bash can use this feature to run arbitrary commands for each line of the script.

Solution

Update the affected package.

See Also

https://www.sudo.ws/sudo/alerts/bash_env.html

http://www.nessus.org/u?3eaceea2

Plugin Details

Severity: Medium

ID: 21392

File Name: freebsd_pkg_1b7250799ef611dab410000e0c2e438a.nasl

Version: 1.17

Type: local

Published: 5/13/2006

Updated: 1/6/2021

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.3

CVSS v2

Risk Factor: Medium

Base Score: 4.6

Temporal Score: 3.4

Vector: CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P

Vulnerability Information

CPE: p-cpe:/a:freebsd:freebsd:sudo, cpe:/o:freebsd:freebsd

Required KB Items: Host/local_checks_enabled, Host/FreeBSD/release, Host/FreeBSD/pkg_info

Exploit Ease: No known exploits are available

Patch Publication Date: 2/16/2006

Vulnerability Publication Date: 10/25/2005

Reference Information

CVE: CVE-2005-2959

BID: 15191