← Vulnerability feed

Vulnerability record · CVE-2021-4104 · published 14 December 2021

CVE-2021-4104: Apache Log4j 1.2 JMSAppender deserialization leads to remote code execution

Apache · Log4j

JMSAppender in Apache Log4j 1.2 deserializes untrusted data when an attacker can write to the Log4j configuration, allowing TopicBindingName and TopicConnectionFactoryBindingName to trigger JNDI lookups and remote code execution similar to CVE-2021-44228. It only affects Log4j 1.2 when JMSAppender is explicitly configured, which is not the default, and Log4j 1.2 has been end-of-life since August 2015. The flaw matters because many enterprise products still bundle Log4j 1.2, and successful exploitation gives code execution on the application server.

7.5 CVSS 3.1 High EPSS 81% · top 0.4% CWE-502 · Deserialization of untrusted data
7.5CVSS 3.1 base score, v2 6.0
81%EPSS exploitation probability, 30 days
NoNot in CISA KEV
46Affected product versions listed by NVD
28References
17 Jun 2026Last modified by NVD

Description

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.

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

high priorityCVSS 3.1 score is 7.5 (HIGH) and EPSS is 0.81147, but exploitation requires prior write access to the Log4j configuration and JMSAppender is not enabled by default.

What it is

JMSAppender in Apache Log4j 1.2 deserializes untrusted data when an attacker can write to the Log4j configuration, allowing TopicBindingName and TopicConnectionFactoryBindingName to trigger JNDI lookups and remote code execution similar to CVE-2021-44228. It only affects Log4j 1.2 when JMSAppender is explicitly configured, which is not the default, and Log4j 1.2 has been end-of-life since August 2015. The flaw matters because many enterprise products still bundle Log4j 1.2, and successful exploitation gives code execution on the application server.

Impact

An attacker who can modify the Log4j configuration can cause the application to load and execute attacker-controlled code via JNDI, gaining remote code execution in the context of the logging process. This can lead to full compromise of the affected application and its host.

Attack surface

The vulnerability is network-reachable (AV:N) and requires low privileges (PR:L) because the attacker must already have write access to the Log4j configuration; no user interaction is needed (UI:N). It is only exposed when JMSAppender is explicitly enabled in the Log4j 1.2 configuration.

Exploitation

CVE-2021-4104 is not listed in CISA KEV, but EPSS shows a 30-day exploitation probability of 0.81147 (99.6th percentile), indicating high predicted likelihood. Reference tags are empty, so no confirmed in-the-wild exploitation is documented in this record.

What to do

  • Upgrade from Log4j 1.2 to Log4j 2, which is the vendor-recommended fix and addresses this and other issues.
  • If upgrade is not immediately possible, remove or disable JMSAppender in all Log4j 1.2 configurations.
  • Restrict write access to Log4j configuration files to trusted administrators only.
  • Apply vendor patches for affected products such as Red Hat JBoss, Oracle, and Fedora packages.
  • Monitor and block outbound JNDI/LDAP/RMI traffic from application servers where feasible.

Detection

  • Search application and server logs for JNDI lookup strings such as ldap://, rmi://, dns://, or suspicious TopicBindingName and TopicConnectionFactoryBindingName values.
  • Monitor file integrity on Log4j configuration files for unauthorized changes.
  • Detect unexpected outbound network connections from Java application servers to external LDAP, RMI, or DNS endpoints.
  • Inventory applications and dependencies for Log4j 1.2 and JMSAppender usage.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

46 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2021-4104 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed9.8CVE-2021-44026Roundcube Webmail SQL injection via search parametersRoundcube Webmail before 1.3.17 and 1.4.x before 1.4.12 is prone to SQL injection through the search or search_params input. The flaw is remotely rea…KEVEPSS 70%analysed9.8CVE-2021-42013Apache HTTP Server path traversal and RCE via incomplete fixThe fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient, leaving a path traversal flaw that lets attackers map URLs to files outside…KEVEPSS 100%analysed9.8CVE-2021-41773Apache HTTP Server 2.4.49 path traversal and RCEA path normalization flaw introduced in Apache HTTP Server 2.4.49 lets attackers map URLs to files outside directories configured by Alias-like direc…KEVEPSS 100%analysed9.8CVE-2021-1870Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions, affecting macOS Big Sur, Catalina, Mojave, iOS and iPadOS, plus WebKitGTK a…KEVEPSS 7.7%analysed9.8CVE-2021-1871Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions. It affects macOS Big Sur, Catalina, Mojave, iOS and iPadOS, and a remote at…KEVEPSS 7.0%analysed9.8CVE-2020-17530Apache Struts forced OGNL evaluation enables remote code executionApache Struts 2.0.0 through 2.5.25 performs forced OGNL evaluation on raw user input placed in tag attributes, allowing expression language injection…KEVEPSS 96%analysed

Source: NIST National Vulnerability Database (record CVE-2021-4104), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.