PoC Monitor
← All CVEs
CVE-2021-45046published 14 Dec 2021 16:55 UTCData: JSON · API

Apache Software Foundation Apache Log4j

Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a denial of service attack

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.

First public PoC 13 hafter publication · 15 Dec 2021
Public PoCs108 on GitHub · 2 Exploit-DB, Metasploit or nuclei
CVSS9.0critical · scored by CISA ADP · CWE-917
CISA KEV 1 May 20231.4 years after publication · ransomware use known

Affected versions and mitigation

From the CVE record, GitHub Security Advisories and the vendor's references.

Affected

org.apache.logging.log4j:log4j-core (Maven)
  • >= 2.13.0, < 2.16.0

Fixed in 2.16.0

from GitHub Security Advisory GHSA-7rjr-3q55-vv33

org.apache.logging.log4j:log4j-core (Maven)
  • >= 2.4.0, < 2.12.2

Fixed in 2.12.2

from GitHub Security Advisory GHSA-7rjr-3q55-vv33

org.ops4j.pax.logging:pax-logging-log4j2 (Maven)
  • >= 1.8.0, < 1.9.2

Fixed in 1.9.2

from GitHub Security Advisory GHSA-7rjr-3q55-vv33

org.ops4j.pax.logging:pax-logging-log4j2 (Maven)
  • >= 1.10.0, < 1.10.8

Fixed in 1.10.8

from GitHub Security Advisory GHSA-7rjr-3q55-vv33

org.ops4j.pax.logging:pax-logging-log4j2 (Maven)
  • >= 1.11.0, < 1.11.11

Fixed in 1.11.11

from GitHub Security Advisory GHSA-7rjr-3q55-vv33

org.ops4j.pax.logging:pax-logging-log4j2 (Maven)
  • >= 2.0.0, < 2.0.12

Fixed in 2.0.12

from GitHub Security Advisory GHSA-7rjr-3q55-vv33

org.apache.logging.log4j:log4j-core (Maven)
  • < 2.3.1

Fixed in 2.3.1

from GitHub Security Advisory GHSA-7rjr-3q55-vv33

Mitigation

Upgrade org.apache.logging.log4j:log4j-core to 2.16.0 or later.

Upgrade org.apache.logging.log4j:log4j-core to 2.12.2 or later.

Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to 1.9.2 or later.

Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to 1.10.8 or later.

Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to 1.11.11 or later.

Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to 2.0.12 or later.

Upgrade org.apache.logging.log4j:log4j-core to 2.3.1 or later.

Timeline

Days relative to CVE publication
t=0+60+120+180+240+300+360+420+480CVE published14 Dec 2021 · t = 0First public PoC15 Dec 2021 · t+13hAdded to CISA KEV1 May 2023 · t+1.4y

First public PoC 13 h after publication; added to CISA KEV 1.4 years after publication. First PoC: cckuailong/Log4j_CVE-2021-45046 (created 15 Dec 2021, found by us: backfilled).

PoC repositories

Found on GitHub.

8 PoCs · 3 pending · 8 informational · 1 not a PoC

PoCs 8
RepositoryCreatedStarsAssessment
cckuailong/Log4j_CVE-2021-45046 15 Dec 2021 +13 h 22 PoC via PoC Index
tejas-nagchandi/CVE-2021-45046 15 Dec 2021 +24 h 0 PoC via PoC Index
pravin-pp/log4j2-CVE-2021-45046 15 Dec 2021 +1.1 d 0 PoC
lwollan/log4j-exploit-server 7 Jan 2022 +24 d 0 PoC
VMsec/log4jScan_Modify 12 Jan 2022 +29 d 3 PoC
hbeooooooom/Log4shell_poc 6 May 2024 +2.4 y 1 PoC via PoC Index
yonocruzhj/AIG---Tasks 19 Dec 2024 +3.0 y 0 PoC via PoC Index
ifconfig-me/Log4Shell-Payloads 23 Jul 2025 +3.6 y 8 PoC via PoC Index
Pending 3
RepositoryCreatedStarsAssessment
sschakraborty/SecurityPOC 12 Dec 2021 −2.3 d 1 Pending · repository exceeds size limit via PoC Index
EMSeek/log4poc 15 Dec 2021 +14 h 1 Pending · repository exceeds size limit via PoC Index
mergebase/log4j-samples 16 Dec 2021 +2.1 d 14 Pending · repository exceeds size limit
Informational 8
RepositoryCreatedFound by usStarsAssessment
thedevappsecguy/Log4J-Mitigation-CVE-2021-44228--CVE-2021-45046--CVE-2021-45105--CVE-2021-44832 13 Dec 2021 −1.4 d backfilled 2 Informational · list
BobTheShoplifter/CVE-2021-45046-Info 15 Dec 2021 +16 h backfilled 4 Informational · write-up
lukepasek/log4jjndilookupremove 17 Dec 2021 +3.1 d backfilled 0 Informational · detection
Flags · score 15
  • no network code found (normal for a local exploit)

Below the suspicion threshold (50); does not change the assessment.

ludy-dev/cve-2021-45046 18 Dec 2021 +3.8 d backfilled 1 Informational · write-up
lijiejie/log4j2_vul_local_scanner 20 Dec 2021 +5.8 d backfilled 85 Informational · detection
CaptanMoss/Log4Shell-Sandbox-Signature 24 Dec 2021 +9.7 d backfilled 1 Informational · detection
Flags · score 40
  • contains executables (log4j.exe)

Below the suspicion threshold (50); does not change the assessment.

shaily29-eng/CyberSecurity_CVE-2021-45046 9 May 2024 +2.4 y backfilled 0 Informational · write-up
mcpmark-eval-liuhezi/log4shell-audit-lab 22 Oct 2026 +4.9 y 15 Nov 2026 0 Informational · write-up
Not a PoC 1
RepositoryCreatedStarsAssessment
Puliczek/CVE-2021-44228-PoC-log4j-bypass-words 10 Dec 2021 −3.8 d 953 Not a PoC · unrelated

Only PoCs count toward the first-PoC date and the characteristics below. "Backfilled" means we found the repository more than 30 days after it was created. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.
SourceTitlePublishedFound by us
MetasploitMetasploit auxiliary: Log4Shell HTTP Scanner (auxiliary/scanner/http/log4shell_scanner)28 Dec 202114 Nov 2026
nuclei templatenuclei template: Apache Log4j2 - Remote Code Injection27 Apr 202314 Nov 2026

PoC characteristics

What to hunt for in your logs · from 10 PoC repos

GET /

Key headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Cookie: mt.v=***; CU_ACT={var}.L4J.quua8mp7vfexh3a3qkf1sggj9.canarytokens.com/a}; CID_CART_COOKIE={var}.L4J.quua8mp7vfexh3a3qkf1sggj9.canarytokens.com/a}; IBSD_LOCALE=en_US; CU_BRAND={var}.L4J.quua8mp7vfexh3a3qkf1sggj9.canarytokens.com/a}; jsession_unique_id=xx888dd667ggddd23454d Referer: https://www.google.com/search?BC=en&q=testing
PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36
Seen in
1 repo: ifconfig-me/Log4Shell-Payloads
Evidence
ifconfig-me/Log4Shell-Payloads/README.md:68 ifconfig-me/Log4Shell-Payloads/README.md:379

GET /test

Query
id=
Key headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Cookie: LastMRH_Session=***; MRHSession=*** Origin: {var}di:dns{var}//quua8mp7vfexh3a3qkf1sggj9{var}canarytokens.com} Referer: {var}di:dns{var}//quua8mp7vfexh3a3qkf1sggj9{var}canarytokens.com}
PoC User-Agent
{var}di:dns{var}//quua8mp7vfexh3a3qkf1sggj9{var}canarytokens.com}
Seen in
1 repo: ifconfig-me/Log4Shell-Payloads
Evidence
ifconfig-me/Log4Shell-Payloads/README.md:52 ifconfig-me/Log4Shell-Payloads/README.md:365

GET /OpenWebPage.class

Ports
8000
Seen in
1 repo: lwollan/log4j-exploit-server
Evidence
lwollan/log4j-exploit-server/README.md:62

POST /addrecord

Content-Type
application/json
Ports
8080
Seen in
1 repo: pravin-pp/log4j2-CVE-2021-45046
Evidence
pravin-pp/log4j2-CVE-2021-45046/README.md:31

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

GET /dev/null
(?i)^/dev/null(?:[?#].*)?$
GET /
(?i)^/(?:[?#].*)?$
GET /test
(?i)^/test\?(?:.*&)?id=
GET /OpenWebPage.class
(?i)^/OpenWebPage\.class(?:[?#].*)?$
GET /a}
(?i)^/a\}(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

GET /dev/null
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2021-45046 Apache Software Foundation Apache Log4j exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/dev/null"; reference:url,poc.griffinguard.io/cve/CVE-2021-45046; classtype:web-application-attack; sid:9690299; rev:1;)
GET /
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2021-45046 Apache Software Foundation Apache Log4j exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.header; content:"Accept: text/html,application/xhtml+xml,application/xml|3b|q=0.9,*/*|3b|q=0.8"; nocase; http.header; content:"Cookie: mt.v=***|3b| CU_ACT="; nocase; http.header; content:"Referer: https://www.google.com/search?BC=en&q=testing"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2021-45046; classtype:web-application-attack; sid:9267866; rev:1;)
GET /test
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2021-45046 Apache Software Foundation Apache Log4j exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/test"; http.uri; content:"id="; http.header; content:"Accept: text/html,application/xhtml+xml,application/xml|3b|q=0.9,*/*|3b|q=0.8"; nocase; http.header; content:"Cookie: LastMRH_Session=***|3b| MRHSession=***"; nocase; http.header_names; content:"Origin"; nocase; http.header_names; content:"Referer"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2021-45046; classtype:web-application-attack; sid:9498522; rev:1;)
GET /OpenWebPage.class
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2021-45046 Apache Software Foundation Apache Log4j exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/OpenWebPage.class"; reference:url,poc.griffinguard.io/cve/CVE-2021-45046; classtype:web-application-attack; sid:9157669; rev:1;)
GET /a}
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2021-45046 Apache Software Foundation Apache Log4j exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/a}"; http.header_names; content:"X-Api-Version"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2021-45046; classtype:web-application-attack; sid:9780852; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

GET /dev/null
title: Apache Software Foundation Apache Log4j exploit attempt (CVE-2021-45046)
id: gg-pocmon-cve-2021-45046-9690299
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-45046. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2021-45046
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/dev/null'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2021.45046
GET /
title: Apache Software Foundation Apache Log4j exploit attempt (CVE-2021-45046)
id: gg-pocmon-cve-2021-45046-9267866
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-45046. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2021-45046
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2021.45046
GET /test
title: Apache Software Foundation Apache Log4j exploit attempt (CVE-2021-45046)
id: gg-pocmon-cve-2021-45046-9498522
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-45046. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2021-45046
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/test'
    cs-uri-query|contains|all:
      - 'id='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2021.45046
GET /OpenWebPage.class
title: Apache Software Foundation Apache Log4j exploit attempt (CVE-2021-45046)
id: gg-pocmon-cve-2021-45046-9157669
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-45046. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2021-45046
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/OpenWebPage.class'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2021.45046
GET /a}
title: Apache Software Foundation Apache Log4j exploit attempt (CVE-2021-45046)
id: gg-pocmon-cve-2021-45046-9780852
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-45046. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2021-45046
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/a}'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2021.45046