Amazon Linux AMI : libxml2 (ALAS-2023-1743)

critical Nessus Plugin ID 175091

Synopsis

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

Description

The version of libxml2 installed on the remote host is prior to 2.9.1-6.6.42. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS-2023-1743 advisory.

parser.c in libxml2 before 2.9.5 mishandles parameter-entity references because the NEXTL macro calls the xmlParserHandlePEReference function in the case of a '%' character in a DTD name. (CVE-2017-16931)

GNOME project libxml2 v2.9.10 has a global buffer over-read vulnerability in xmlEncodeEntitiesInternal at libxml2/entities.c. The issue has been fixed in commit 50f06b3e. (CVE-2020-24977)

There's a flaw in libxml2's xmllint. An attacker who is able to submit a crafted file to be processed by xmllint could trigger a use-after-free. The greatest impact of this flaw is to confidentiality, integrity, and availability. (CVE-2021-3516)

There is a flaw in the xml entity encoding functionality of libxml2. An attacker who is able to supply a crafted file to be processed by an application linked with the affected functionality of libxml2 could trigger an out-of-bounds read. The most likely impact of this flaw is to application availability, with some potential impact to confidentiality and integrity if an attacker is able to use memory information to further exploit the application. (CVE-2021-3517)

There's a flaw in libxml2. An attacker who is able to submit a crafted file to be processed by an application linked with libxml2 could trigger a use-after-free. The greatest impact from this flaw is to confidentiality, integrity, and availability. (CVE-2021-3518)

A NULL pointer dereference flaw was found in libxml2, where it did not propagate errors while parsing XML mixed content. This flaw causes the application to crash if an untrusted XML document is parsed in recovery mode and post validated. The highest threat from this vulnerability is to system availability.
(CVE-2021-3537)

A flaw was found in libxml2. Exponential entity expansion attack its possible bypassing all existing protection mechanisms and leading to denial of service. (CVE-2021-3541)

valid.c in libxml2 before 2.9.13 has a use-after-free of ID and IDREF attributes. (CVE-2022-23308)

A flaw was found in the libxml2 library in functions used to manipulate the xmlBuf and the xmlBuffer types. A substantial input causes values to calculate buffer sizes to overflow, resulting in an out-of- bounds write. (CVE-2022-29824)

An issue was discovered in libxml2 before 2.10.3. When parsing a multi-gigabyte XML document with the XML_PARSE_HUGE parser option enabled, several integer counters can overflow. This results in an attempt to access an array at a negative 2GB offset, typically leading to a segmentation fault. (CVE-2022-40303)

An issue was discovered in libxml2 before 2.10.3. Certain invalid XML entity definitions can corrupt a hash table key, potentially leading to subsequent logic errors. In one case, a double-free can be provoked. (CVE-2022-40304)

A NULL pointer dereference exists when parsing (invalid) XML schemas in libxml2 xmlSchemaCheckCOSSTDerivedOK (CVE-2023-28484)

libxml2 Hashing of empty dict strings isn't deterministic. When hashing empty strings which aren't null- terminated, xmlDictComputeFastKey could produce inconsistent results. This could lead to various logic or memory errors, including double frees. (CVE-2023-29469)

Tenable has extracted the preceding description block directly from the tested product security advisory.

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 libxml2' to update your system.

See Also

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

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

https://alas.aws.amazon.com/cve/html/CVE-2020-24977.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3516.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3517.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3518.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3537.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3541.html

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

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

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

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

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

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

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

Plugin Details

Severity: Critical

ID: 175091

File Name: ala_ALAS-2023-1743.nasl

Version: 1.2

Type: local

Agent: unix

Published: 5/4/2023

Updated: 12/11/2024

Supported Sensors: Agentless Assessment, Continuous 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-2021-3517

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

CVSS Score Source: CVE-2017-16931

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:libxml2-devel, p-cpe:/a:amazon:linux:libxml2-debuginfo, p-cpe:/a:amazon:linux:libxml2-python27, p-cpe:/a:amazon:linux:libxml2, cpe:/o:amazon:linux, p-cpe:/a:amazon:linux:libxml2-python26, p-cpe:/a:amazon:linux:libxml2-static

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: 4/27/2023

Vulnerability Publication Date: 11/23/2017

Reference Information

CVE: CVE-2017-16931, CVE-2020-24977, CVE-2021-3516, CVE-2021-3517, CVE-2021-3518, CVE-2021-3537, CVE-2021-3541, CVE-2022-23308, CVE-2022-29824, CVE-2022-40303, CVE-2022-40304, CVE-2023-28484, CVE-2023-29469