Ubuntu 21.10 : PHP vulnerabilities (USN-5300-3)

critical Nessus Plugin ID 158679

Synopsis

The remote Ubuntu host is missing one or more security updates.

Description

The remote Ubuntu 21.10 host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-5300-3 advisory.

- The zend_string_extend function in Zend/zend_string.h in PHP through 7.1.5 does not prevent changes to string objects that result in a negative length, which allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact by leveraging a script's use of .= with a long string. (CVE-2017-8923)

- PHP 7.1.5 has an Out of bounds access in php_pcre_replace_impl via a crafted preg_replace call.
(CVE-2017-9118)

- PHP 7.x through 7.1.5 allows remote attackers to cause a denial of service (buffer overflow and application crash) or possibly have unspecified other impact via a long string because of an Integer overflow in mysqli_real_escape_string. (CVE-2017-9120)

- In PHP versions 7.3.x below 7.3.33, 7.4.x below 7.4.26 and 8.0.x below 8.0.13, certain XML parsing functions, like simplexml_load_file(), URL-decode the filename passed to them. If that filename contains URL-encoded NUL character, this may cause the function to interpret this as the end of the filename, thus interpreting the filename differently from what the user intended, which may lead it to reading a different file than intended. (CVE-2021-21707)

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

Solution

Update the affected packages.

See Also

https://ubuntu.com/security/notices/USN-5300-3

Plugin Details

Severity: Critical

ID: 158679

File Name: ubuntu_USN-5300-3.nasl

Version: 1.5

Type: local

Agent: unix

Published: 3/7/2022

Updated: 10/18/2023

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 6.2

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

CVSS Score Source: CVE-2017-9120

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 9.1

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:F/RL:O/RC:C

Vulnerability Information

CPE: cpe:/o:canonical:ubuntu_linux:21.10, p-cpe:/a:canonical:ubuntu_linux:libapache2-mod-php8.0, p-cpe:/a:canonical:ubuntu_linux:libphp8.0-embed, p-cpe:/a:canonical:ubuntu_linux:php8.0, p-cpe:/a:canonical:ubuntu_linux:php8.0-bcmath, p-cpe:/a:canonical:ubuntu_linux:php8.0-bz2, p-cpe:/a:canonical:ubuntu_linux:php8.0-cgi, p-cpe:/a:canonical:ubuntu_linux:php8.0-cli, p-cpe:/a:canonical:ubuntu_linux:php8.0-common, p-cpe:/a:canonical:ubuntu_linux:php8.0-curl, p-cpe:/a:canonical:ubuntu_linux:php8.0-dba, p-cpe:/a:canonical:ubuntu_linux:php8.0-dev, p-cpe:/a:canonical:ubuntu_linux:php8.0-enchant, p-cpe:/a:canonical:ubuntu_linux:php8.0-fpm, p-cpe:/a:canonical:ubuntu_linux:php8.0-gd, p-cpe:/a:canonical:ubuntu_linux:php8.0-gmp, p-cpe:/a:canonical:ubuntu_linux:php8.0-imap, p-cpe:/a:canonical:ubuntu_linux:php8.0-interbase, p-cpe:/a:canonical:ubuntu_linux:php8.0-intl, p-cpe:/a:canonical:ubuntu_linux:php8.0-ldap, p-cpe:/a:canonical:ubuntu_linux:php8.0-mbstring, p-cpe:/a:canonical:ubuntu_linux:php8.0-mysql, p-cpe:/a:canonical:ubuntu_linux:php8.0-odbc, p-cpe:/a:canonical:ubuntu_linux:php8.0-opcache, p-cpe:/a:canonical:ubuntu_linux:php8.0-pgsql, p-cpe:/a:canonical:ubuntu_linux:php8.0-phpdbg, p-cpe:/a:canonical:ubuntu_linux:php8.0-pspell, p-cpe:/a:canonical:ubuntu_linux:php8.0-readline, p-cpe:/a:canonical:ubuntu_linux:php8.0-snmp, p-cpe:/a:canonical:ubuntu_linux:php8.0-soap, p-cpe:/a:canonical:ubuntu_linux:php8.0-sqlite3, p-cpe:/a:canonical:ubuntu_linux:php8.0-sybase, p-cpe:/a:canonical:ubuntu_linux:php8.0-tidy, p-cpe:/a:canonical:ubuntu_linux:php8.0-xml, p-cpe:/a:canonical:ubuntu_linux:php8.0-xsl, p-cpe:/a:canonical:ubuntu_linux:php8.0-zip

Required KB Items: Host/cpu, Host/Debian/dpkg-l, Host/Ubuntu, Host/Ubuntu/release

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 3/7/2022

Vulnerability Publication Date: 5/12/2017

Reference Information

CVE: CVE-2017-8923, CVE-2017-9118, CVE-2017-9120, CVE-2021-21707

IAVA: 2021-A-0566-S

IAVB: 2017-B-0060-S

USN: 5300-3