GLSA-202310-16 : Ubiquiti UniFi: remote code execution via bundled log4j

critical Nessus Plugin ID 183901

Description

The remote host is affected by the vulnerability described in GLSA-202310-16 (Ubiquiti UniFi: remote code execution via bundled log4j)

- JMSAppender in Log4j 1.2 is vulnerable to deserialization of untrusted data when the attacker has write access to the Log4j configuration. The attacker can provide TopicBindingName and TopicConnectionFactoryBindingName configurations causing JMSAppender to perform JNDI requests that result in remote code execution in a similar fashion to CVE-2021-44228. Note this issue only affects Log4j 1.2 when specifically configured to use JMSAppender, which is not the default. Apache Log4j 1.2 reached end of life in August 2015. Users should upgrade to Log4j 2 as it addresses numerous other issues from the previous versions. (CVE-2021-4104)

- It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non- default configurations. This could allows attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-default Pattern Layout with either a Context Lookup (for example, $${ctx:loginId}) or a Thread Context Map pattern (%X, %mdc, or %MDC) to craft malicious input data using a JNDI Lookup pattern resulting in an information leak and remote code execution in some environments and local code execution in all environments. Log4j 2.16.0 (Java 8) and 2.12.2 (Java 7) fix this issue by removing support for message lookup patterns and disabling JNDI functionality by default.
(CVE-2021-45046)

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

Solution

All Ubiquity UniFi users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=net-wireless/unifi-6.5.55

See Also

https://security.gentoo.org/glsa/202310-16

https://bugs.gentoo.org/show_bug.cgi?id=828853

Plugin Details

Severity: Critical

ID: 183901

File Name: gentoo_GLSA-202310-16.nasl

Version: 1.0

Type: local

Published: 10/26/2023

Updated: 10/26/2023

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: High

Score: 8.1

CVSS v2

Risk Factor: Medium

Base Score: 6

Temporal Score: 5

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

CVSS Score Source: CVE-2021-4104

CVSS v3

Risk Factor: Critical

Base Score: 9

Temporal Score: 8.3

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

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

CVSS Score Source: CVE-2021-45046

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:unifi, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 10/26/2023

Vulnerability Publication Date: 12/10/2021

CISA Known Exploited Vulnerability Due Dates: 5/22/2023

Reference Information

CVE: CVE-2021-4104, CVE-2021-45046