Amazon Linux 2 : php (ALAS-2023-2375)

critical Nessus Plugin ID 186577

Synopsis

The remote Amazon Linux 2 host is missing a security update.

Description

The version of php installed on the remote host is prior to 5.4.16-46. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2023-2375 advisory.

- An issue was discovered in Oniguruma 6.2.0, as used in Oniguruma-mod in Ruby through 2.4.1 and mbstring in PHP through 7.1.5. A heap out-of-bounds write occurs in bitset_set_range() during regular expression compilation due to an uninitialized variable from an incorrect state transition. An incorrect state transition in parse_char_class() could create an execution path that leaves a critical local variable uninitialized until it's used as an index, resulting in an out-of-bounds write memory corruption.
(CVE-2017-9228)

- An issue was discovered in Oniguruma 6.2.0, as used in Oniguruma-mod in Ruby through 2.4.1 and mbstring in PHP through 7.1.5. A SIGSEGV occurs in left_adjust_char_head() during regular expression compilation.
Invalid handling of reg->dmax in forward_search_range() could result in an invalid pointer dereference, normally as an immediate denial-of-service condition. (CVE-2017-9229)

- In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when using Postgres database extension, supplying invalid parameters to the parametrized query may lead to PHP attempting to free memory using uninitialized data as pointers. This could lead to RCE vulnerability or denial of service. (CVE-2022-31625)

- In PHP 8.0.X before 8.0.28, 8.1.X before 8.1.16 and 8.2.X before 8.2.3, excessive number of parts in HTTP form upload can cause high resource consumption and excessive number of log entries. This can cause denial of service on the affected server by exhausting CPU resources or disk space. (CVE-2023-0662)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Run 'yum update php' to update your system.

See Also

https://alas.aws.amazon.com/AL2/ALAS-2023-2375.html

https://alas.aws.amazon.com/cve/html/CVE-2017-9228.html

https://alas.aws.amazon.com/cve/html/CVE-2017-9229.html

https://alas.aws.amazon.com/cve/html/CVE-2022-31625.html

https://alas.aws.amazon.com/cve/html/CVE-2023-0662.html

https://alas.aws.amazon.com/faqs.html

Plugin Details

Severity: Critical

ID: 186577

File Name: al2_ALAS-2023-2375.nasl

Version: 1.1

Type: local

Agent: unix

Published: 12/4/2023

Updated: 12/5/2023

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.9

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

CVSS Score Source: CVE-2017-9228

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:php, p-cpe:/a:amazon:linux:php-bcmath, p-cpe:/a:amazon:linux:php-cli, p-cpe:/a:amazon:linux:php-common, p-cpe:/a:amazon:linux:php-dba, p-cpe:/a:amazon:linux:php-debuginfo, p-cpe:/a:amazon:linux:php-devel, p-cpe:/a:amazon:linux:php-embedded, p-cpe:/a:amazon:linux:php-enchant, p-cpe:/a:amazon:linux:php-fpm, p-cpe:/a:amazon:linux:php-gd, p-cpe:/a:amazon:linux:php-intl, p-cpe:/a:amazon:linux:php-ldap, p-cpe:/a:amazon:linux:php-mbstring, p-cpe:/a:amazon:linux:php-mysqlnd, p-cpe:/a:amazon:linux:php-odbc, p-cpe:/a:amazon:linux:php-pdo, p-cpe:/a:amazon:linux:php-pgsql, p-cpe:/a:amazon:linux:php-process, p-cpe:/a:amazon:linux:php-pspell, p-cpe:/a:amazon:linux:php-recode, p-cpe:/a:amazon:linux:php-snmp, p-cpe:/a:amazon:linux:php-soap, p-cpe:/a:amazon:linux:php-xml, p-cpe:/a:amazon:linux:php-xmlrpc, cpe:/o:amazon:linux:2

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

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 11/29/2023

Vulnerability Publication Date: 5/23/2017

Reference Information

CVE: CVE-2017-9228, CVE-2017-9229, CVE-2022-31625, CVE-2023-0662

IAVA: 2023-A-0105-S, 2023-A-0423

IAVB: 2017-B-0088-S