VYPR
Moderate severityNVD Advisory· Published Dec 28, 2021· Updated Aug 4, 2024

Apache Log4j2 vulnerable to RCE via JDBC Appender when attacker controls configuration

CVE-2021-44832

Description

Apache Log4j2 versions 2.0-beta7 through 2.17.0 (excluding security fix releases 2.3.2 and 2.12.4) are vulnerable to a remote code execution (RCE) attack when a configuration uses a JDBC Appender with a JNDI LDAP data source URI when an attacker has control of the target LDAP server. This issue is fixed by limiting JNDI data source names to the java protocol in Log4j2 versions 2.17.1, 2.12.4, and 2.3.2.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Apache Log4j2 versions 2.0-beta7 through 2.17.0 are vulnerable to RCE via JDBC Appender when an attacker controls the logging configuration and a malicious LDAP server.

Vulnerability

Apache Log4j2 versions 2.0-beta7 through 2.17.0 (excluding security fix releases 2.3.2 and 2.12.4) are vulnerable to a remote code execution (RCE) attack when a configuration uses a JDBC Appender with a JNDI LDAP data source URI [2][4]. The vulnerability arises because the JDBC Appender does not restrict the protocol used in JNDI data source names, allowing an attacker to specify an LDAP URI that points to a malicious LDAP server [4].

Exploitation

An attacker must have permission to modify the Log4j2 logging configuration file [4]. With that access, the attacker can construct a malicious configuration that includes a JDBC Appender with a data source referencing a JNDI LDAP URI. When the application processes the configuration, Log4j2 will connect to the attacker-controlled LDAP server, which can return a serialized Java object that leads to remote code execution [4].

Impact

Successful exploitation allows an attacker to execute arbitrary code on the target system with the privileges of the application using Log4j2 [2][4]. This can lead to full compromise of the affected system, including data exfiltration, installation of malware, or further lateral movement within the network.

Mitigation

The issue is fixed by limiting JNDI data source names to the java protocol in Log4j2 versions 2.17.1, 2.12.4, and 2.3.2 [2][4]. Users should upgrade to these versions or later. If upgrading is not immediately possible, ensure that logging configuration files are protected from unauthorized modification [4]. No workaround is available that does not involve upgrading or restricting configuration file access.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.apache.logging.log4j:log4j-coreMaven
>= 2.0-beta7, < 2.3.22.3.2
org.apache.logging.log4j:log4j-coreMaven
>= 2.4, < 2.12.42.12.4
org.apache.logging.log4j:log4j-coreMaven
>= 2.13.0, < 2.17.12.17.1
org.ops4j.pax.logging:pax-logging-log4j2Maven
>= 1.8.0, < 1.9.21.9.2
org.ops4j.pax.logging:pax-logging-log4j2Maven
>= 1.10.0, < 1.10.91.10.9
org.ops4j.pax.logging:pax-logging-log4j2Maven
>= 1.11.0, < 1.11.131.11.13
org.ops4j.pax.logging:pax-logging-log4j2Maven
>= 2.0.0, < 2.0.142.0.14

Affected products

3

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

18

News mentions

0

No linked articles in our index yet.