# CVE-2021-44228 (Log4Shell): Apache Log4j2 Remote Code Execution

> Attackers can execute arbitrary code via crafted log messages in Apache Log4j2 when JNDI lookup is enabled.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 10 Dec 2021 (CISA KEV), used in ransomware
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Dec 2021
- **Updated:** 21 Oct 2025
- **Also known as:** DEBIAN-CVE-2021-44228, DLA-2842-1, DSA-5020-1, GHSA-jfh8-c2jp-5v3q, MGASA-2021-0556, MINI-xf97-3r68-mwq9, OESA-2021-1462, OESA-2022-1943, UBUNTU-CVE-2021-44228, USN-5192-1, USN-5192-2, openSUSE-SU-2021:1577-1, openSUSE-SU-2021:1586-1, openSUSE-SU-2021:1613-1, openSUSE-SU-2021:3999-1, openSUSE-SU-2021:4109-1, openSUSE-SU-2024:11666-1, openSUSE-SU-2024:11683-1

## What is CVE-2021-44228?

CVE-2021-44228 (Log4Shell) is a critical code injection vulnerability in Apple Xcode, published on 10 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. From version 2.16.0 (along with 2.12.2, 2.12.3, and 2.3.1), this functionality has been completely removed. Note that this vulnerability is specific to log4j-core and does not affect log4net, log4cxx, or other Apache Logging Services projects.

Weakness: CWE-917 (Improper Neutralization of Special Elements used in an Expression Language Statement), CWE-400 (Uncontrolled Resource Consumption), CWE-502 (Deserialization of Untrusted Data), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2021-44228?

20 open source packages ship an affected version, including org.ops4j.pax.logging:pax-logging-log4j2, com.guicedee.services:log4j-core and org.apache.logging.log4j:log4j-core. It affects 143 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 1.10.0 | 1.10.8 |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 1.10.0 | 1.10.8 |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 1.11.0 | 1.11.10 |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 1.11.0 | 1.11.10 |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 1.8.0 | 1.9.2 |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 1.8.0 | 1.9.2 |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 2.0.0 | 2.0.11 |
| `org.ops4j.pax.logging:pax-logging-log4j2` | Maven | From 2.0.0 | 2.0.11 |
| `com.guicedee.services:log4j-core` | Maven | All versions to 1.2.1.2-jre17 | None |
| `com.guicedee.services:log4j-core` | Maven | All versions to 1.2.1.2-jre17 | None |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.0-beta9 | 2.3.1 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.0-beta9 | 2.3.1 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.13.0 | 2.15.0 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.13.0 | 2.15.0 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.4 | 2.12.2 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.4 | 2.12.2 |
| `org.xbib.elasticsearch:log4j` | Maven | All versions | None |
| `org.xbib.elasticsearch:log4j` | Maven | All versions | None |
| `uk.co.nichesolutions.logging.log4j:log4j-core` | Maven | All versions | None |
| `uk.co.nichesolutions.logging.log4j:log4j-core` | Maven | All versions | None |
| `log4j` | openSUSE:Leap 15.2 | All versions | 2.13.0-lp152.3.3.1 |
| `log4j` | openSUSE:Leap 15.2 | All versions | 2.13.0-lp152.3.6.1 |
| `logback` | openSUSE:Leap 15.2 | All versions | 1.2.8-lp152.2.3.2 |
| `log4j` | openSUSE:Leap 15.3 | All versions | 2.13.0-4.3.1 |
| `logback` | openSUSE:Leap 15.3 | All versions | 1.2.8-3.3.1 |
| `log4j` | openSUSE:Tumbleweed | All versions | 2.13.2-2.1 |

Products: Apache Log4j, Apple Xcode, Bentley Synchro, Bentley Synchro 4d, Cisco Advanced Malware Protection Virtual Private Cloud Appliance, Cisco Automated Subsea Tuning, Cisco Broadworks, Cisco Business Process Automation, Cisco Cloud Connect, Cisco Cloudcenter, Cisco Cloudcenter Cost Optimizer, Cisco Cloudcenter Suite, Cisco Cloudcenter Suite Admin, Cisco Cloudcenter Workload Manager, Cisco Common Services Platform Collector, Cisco Connected Mobile Experiences, Cisco Contact Center Domain Manager, Cisco Contact Center Management Portal, Cisco Crosswork Data Gateway, Cisco Crosswork Network Automation and 123 more.

## How do I fix CVE-2021-44228?

Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to a fixed version for your release line: 1.10.8, 1.11.10, 1.9.2 or 2.0.11. US federal agencies must fix it by 24 Dec 2021.

## Is CVE-2021-44228 being exploited?

Yes. Attackers have exploited CVE-2021-44228 in the wild since at least 10 Dec 2021, including in ransomware campaigns.

Public exploit code:

- A fully automated, accurate, and extensive scanner for finding log4j RCE CVE-2021-44228  (github_poc): https://github.com/fullhunt/log4j-scan
- A Proof-Of-Concept for the CVE-2021-44228 vulnerability.  (github_poc): https://github.com/kozmer/log4j-shell-poc
- Spring Boot web application vulnerable to Log4Shell (CVE-2021-44228). (github_poc): https://github.com/christophetd/log4shell-vulnerable-app
- 🐱‍💻 ✂️ 🤬 CVE-2021-44228 - LOG4J Java exploit - WAF bypass tricks (github_poc): https://github.com/Puliczek/CVE-2021-44228-PoC-log4j-bypass-words
- Vulnerability scanner and mitigation patch for Log4j2 CVE-2021-44228 (github_poc): https://github.com/logpresso/CVE-2021-44228-Scanner
- CVE-2021-44228 Log4j2 BurpSuite Scanner,Customize ceye.io api or other apis,including internal networks (github_poc): https://github.com/f0ng/log4j2burpscanner

## Other vulnerabilities in Apple Xcode

- [CVE-2021-45046](https://insights.sbomify.com/CVE-2021-45046/): Apache Log4j2 Deserialization of Untrusted Data (critical 9.0, exploited in the wild)
- [CVE-2022-23305](https://insights.sbomify.com/CVE-2022-23305/): SQL injection in JDBC Appender in Apache Log4j V1 (critical 9.8)
- [CVE-2017-5645](https://insights.sbomify.com/CVE-2017-5645/): Deserialization of Untrusted Data in Log4j (critical 9.8)
- [CVE-2022-23302](https://insights.sbomify.com/CVE-2022-23302/): Deserialization of untrusted data in JMSSink in Apache Log4j 1.x (high 8.8)
- [CVE-2023-26464](https://insights.sbomify.com/CVE-2023-26464/): Apache Log4j 1.x (EOL) allows DoS in Chainsaw and SocketAppender (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-44228 (Log4Shell) and fix it if it is affected.

What it is: CVE-2021-44228 (Log4Shell) is a critical code injection vulnerability in Apple Xcode, published on 10 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2021-44228 in the wild since at least 10 Dec 2021, including in ransomware campaigns.

Affected packages and fixed versions:
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 1.10.0; fixed in 1.10.8
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 1.10.0; fixed in 1.10.8
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 1.11.0; fixed in 1.11.10
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 1.11.0; fixed in 1.11.10
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 1.8.0; fixed in 1.9.2
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 1.8.0; fixed in 1.9.2
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 2.0.0; fixed in 2.0.11
- org.ops4j.pax.logging:pax-logging-log4j2 (Maven): affected from 2.0.0; fixed in 2.0.11
- com.guicedee.services:log4j-core (Maven): affected all versions up to 1.2.1.2-jre17; no fix listed
- com.guicedee.services:log4j-core (Maven): affected all versions up to 1.2.1.2-jre17; no fix listed
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.0-beta9; fixed in 2.3.1
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.0-beta9; fixed in 2.3.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-44228/ (Markdown: https://insights.sbomify.com/CVE-2021-44228/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-44228
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-44228
- OSV: https://osv.dev/vulnerability/CVE-2021-44228

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-44228/
Summaries are generated and may contain mistakes; the official description above is the record.
