Amazon Linux 2023 : php8.1, php8.1-bcmath, php8.1-cli (ALAS2023-2023-081)

critical Nessus Plugin ID 173063

Synopsis

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

Description

It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2023-2023-081 advisory.

- In PHP versions 8.1.x below 8.1.8, when fileinfo functions, such as finfo_buffer, due to incorrect patch applied to the third party code from libmagic, incorrect function may be used to free allocated memory, which may lead to heap corruption. (CVE-2022-31627)

- In PHP versions before 7.4.31, 8.0.24 and 8.1.11, the phar uncompressor code would recursively uncompress quines gzip files, resulting in an infinite loop. (CVE-2022-31628)

- In PHP versions before 7.4.31, 8.0.24 and 8.1.11, the vulnerability enables network and same-site attackers to set a standard insecure cookie in the victim's browser which is treated as a `__Host-` or `__Secure-` cookie by PHP applications. (CVE-2022-31629)

- In PHP versions prior to 7.4.33, 8.0.25 and 8.2.12, when using imageloadfont() function in gd extension, it is possible to supply a specially crafted font file, such as if the loaded font is used with imagechar() function, the read outside allocated buffer will be used. This can lead to crashes or disclosure of confidential information. (CVE-2022-31630)

- The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow that allows attackers to execute arbitrary code or eliminate expected cryptographic properties.
This occurs in the sponge function interface. (CVE-2022-37454)

- php: PDO::quote() may return unquoted string due to an integer overflow (CVE-2022-31631)

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

Solution

Run 'dnf update php8.1 --releasever=2023.0.20230222 ' to update your system.

See Also

https://alas.aws.amazon.com/AL2023/ALAS-2023-081.html

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

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

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

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

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

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

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

Plugin Details

Severity: Critical

ID: 173063

File Name: al2023_ALAS2023-2023-081.nasl

Version: 1.1

Type: local

Agent: unix

Published: 3/21/2023

Updated: 4/21/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: Critical

Base Score: 10

Temporal Score: 7.8

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

CVSS Score Source: CVE-2022-37454

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:php8.1, p-cpe:/a:amazon:linux:php8.1-bcmath, p-cpe:/a:amazon:linux:php8.1-bcmath-debuginfo, p-cpe:/a:amazon:linux:php8.1-cli, p-cpe:/a:amazon:linux:php8.1-cli-debuginfo, p-cpe:/a:amazon:linux:php8.1-common, p-cpe:/a:amazon:linux:php8.1-common-debuginfo, p-cpe:/a:amazon:linux:php8.1-dba, p-cpe:/a:amazon:linux:php8.1-dba-debuginfo, p-cpe:/a:amazon:linux:php8.1-dbg, p-cpe:/a:amazon:linux:php8.1-dbg-debuginfo, p-cpe:/a:amazon:linux:php8.1-debuginfo, p-cpe:/a:amazon:linux:php8.1-debugsource, p-cpe:/a:amazon:linux:php8.1-devel, p-cpe:/a:amazon:linux:php8.1-embedded, p-cpe:/a:amazon:linux:php8.1-embedded-debuginfo, p-cpe:/a:amazon:linux:php8.1-enchant, p-cpe:/a:amazon:linux:php8.1-enchant-debuginfo, p-cpe:/a:amazon:linux:php8.1-ffi, p-cpe:/a:amazon:linux:php8.1-ffi-debuginfo, p-cpe:/a:amazon:linux:php8.1-fpm, p-cpe:/a:amazon:linux:php8.1-fpm-debuginfo, p-cpe:/a:amazon:linux:php8.1-gd, p-cpe:/a:amazon:linux:php8.1-gd-debuginfo, p-cpe:/a:amazon:linux:php8.1-gmp, p-cpe:/a:amazon:linux:php8.1-gmp-debuginfo, p-cpe:/a:amazon:linux:php8.1-intl, p-cpe:/a:amazon:linux:php8.1-intl-debuginfo, p-cpe:/a:amazon:linux:php8.1-ldap, p-cpe:/a:amazon:linux:php8.1-ldap-debuginfo, p-cpe:/a:amazon:linux:php8.1-mbstring, p-cpe:/a:amazon:linux:php8.1-mbstring-debuginfo, p-cpe:/a:amazon:linux:php8.1-mysqlnd, p-cpe:/a:amazon:linux:php8.1-mysqlnd-debuginfo, p-cpe:/a:amazon:linux:php8.1-odbc, p-cpe:/a:amazon:linux:php8.1-odbc-debuginfo, p-cpe:/a:amazon:linux:php8.1-opcache, p-cpe:/a:amazon:linux:php8.1-opcache-debuginfo, p-cpe:/a:amazon:linux:php8.1-pdo, p-cpe:/a:amazon:linux:php8.1-pdo-debuginfo, p-cpe:/a:amazon:linux:php8.1-pgsql, p-cpe:/a:amazon:linux:php8.1-pgsql-debuginfo, p-cpe:/a:amazon:linux:php8.1-process, p-cpe:/a:amazon:linux:php8.1-process-debuginfo, p-cpe:/a:amazon:linux:php8.1-soap, p-cpe:/a:amazon:linux:php8.1-soap-debuginfo, p-cpe:/a:amazon:linux:php8.1-tidy, p-cpe:/a:amazon:linux:php8.1-tidy-debuginfo, p-cpe:/a:amazon:linux:php8.1-xml, p-cpe:/a:amazon:linux:php8.1-xml-debuginfo, cpe:/o:amazon:linux:2023

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: 2/17/2023

Vulnerability Publication Date: 7/28/2022

Reference Information

CVE: CVE-2022-31627, CVE-2022-31628, CVE-2022-31629, CVE-2022-31630, CVE-2022-31631, CVE-2022-37454