RHEL 2.1 : php (RHSA-2002:214)

high Nessus Plugin ID 12326

Synopsis

The remote Red Hat host is missing one or more security updates.

Description

PHP versions up to and including 4.2.2 contain vulnerabilities in the mail() function, allowing local script authors to bypass safe mode restrictions and possibly allowing remote attackers to insert arbitrary mail headers or content.

[Updated 13 Jan 2003] Added fixed packages for the Itanium (IA64) architecture.

[Updated 06 Feb 2003] Added fixed packages for Advanced Workstation 2.1

PHP is an HTML-embedded scripting language commonly used with the Apache HTTP server.

The mail function in PHP 4.x to 4.2.2 may allow local script authors to bypass safe mode restrictions and modify command line arguments to the MTA (such as sendmail) in the 5th argument to mail(), altering MTA behavior and possibly executing arbitrary local commands.

The mail function in PHP 4.x to 4.2.2 does not filter ASCII control characters from its arguments, which could allow remote attackers to modify mail message content, including mail headers, and possibly use PHP as a 'spam proxy.'

Script authors should note that all input data should be checked for unsafe data by any PHP scripts which call functions such as mail().

Note that this PHP errata, as did RHSA-2002:129, enforces memory limits on the size of the PHP process to prevent a badly generated script from becoming a possible source for a denial of service attack.
The default process size is 8Mb, though you can adjust this as you deem necessary through the php.ini directive memory_limit. For example, to change the process memory limit to 4MB, add the following :

memory_limit 4194304

Important Note: There are special instructions you should follow regarding your /etc/php.ini configuration file in the 'Solution' section below.

Solution

Update the affected packages.

See Also

https://access.redhat.com/security/cve/cve-2002-0985

https://access.redhat.com/security/cve/cve-2002-0986

https://marc.info/?l=bugtraq&m=103011916928204

https://access.redhat.com/errata/RHSA-2002:214

Plugin Details

Severity: High

ID: 12326

File Name: redhat-RHSA-2002-214.nasl

Version: 1.23

Type: local

Agent: unix

Published: 7/6/2004

Updated: 1/14/2021

Supported Sensors: Agentless Assessment, Continuous Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Frictionless Assessment Azure, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.8

CVSS v2

Risk Factor: High

Base Score: 7.5

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

Vulnerability Information

CPE: p-cpe:/a:redhat:enterprise_linux:php-devel, p-cpe:/a:redhat:enterprise_linux:php-ldap, p-cpe:/a:redhat:enterprise_linux:php-manual, p-cpe:/a:redhat:enterprise_linux:php, p-cpe:/a:redhat:enterprise_linux:php-imap, p-cpe:/a:redhat:enterprise_linux:php-mysql, p-cpe:/a:redhat:enterprise_linux:php-odbc, cpe:/o:redhat:enterprise_linux:2.1, p-cpe:/a:redhat:enterprise_linux:php-pgsql

Required KB Items: Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list, Host/cpu

Patch Publication Date: 2/5/2003

Vulnerability Publication Date: 9/24/2002

Reference Information

CVE: CVE-2002-0985, CVE-2002-0986

RHSA: 2002:214