CVE-2021-45046
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedIt 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceCVE-2021-45046 is an incomplete fix to CVE-2021-44228 (Log4Shell) in Log4j 2.15.0. When using non-default Pattern Layout configurations with Context Lookup ($${ctx:...}) or Thread Context Map patterns (%X, %mdc, %MDC), attackers who can control MDC input data can inject malicious JNDI Lookup patterns, leading to information disclosure and remote code execution.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 2.0.1, < 2.12.2>= 2.13.0, < 2.16.0= 2.0= 10.0= 11.0= 34= 35all versionsall versionsall versionsall versionsall versionsCVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- High
- Privileges
- None
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Log4j versionLocate the Log4j JAR file in your application (typically in lib/, WEB-INF/lib/, or maven dependencies) or check pom.xml/build.gradle for the log4j-core dependency versionAffected if version is 2.0, or >= 2.0.1 and < 2.12.2, or >= 2.13.0 and < 2.16.0
-
Check for Context Lookup patterns in Log4j configurationReview your Log4j configuration files (log4j2.xml, log4j2.json, log4j2.yaml, log4j2.properties) for the pattern ${ctx:...} or $$ctx:...Affected if Context Lookup patterns are present in the Pattern Layout configuration
-
Check for Thread Context Map patterns in Log4j configurationReview your Log4j configuration files for Pattern Layout containing %X, %mdc, or %MDC placeholdersAffected if Thread Context Map patterns are present in the Pattern Layout configuration
-
Assess MDC input controlDetermine whether your application allows external or untrusted user input to be set into the Thread Context Map (MDC) - review code that calls MDC.put() or similar methods with user-supplied dataAffected if external attackers can control MDC data values and the above version/configuration conditions are met
You are affected if your Log4j version is within the vulnerable ranges AND you use Pattern Layout with Context Lookups ($${ctx:...}) or Thread Context Map patterns (%X/%mdc/%MDC) while allowing untrusted input into MDC.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped2.12.22.16.0
Upgrade to Log4j 2.16.0 (Java 8) or 2.12.2 (Java 7), which remove message lookup support and disable JNDI by default. Alternatively, ensure no non-default Pattern Layouts with context lookups are used and manually disable JNDI lookup.
Log4j 2.16.0 (for Java 8+) or Log4j 2.12.2 (for Java 7)
- 1. Identify the Java version (Java 7 or Java 8+) used by your application to determine the appropriate Log4j version to upgrade to.
- 2. For Java 8+ applications: Upgrade Apache Log4j from the affected version to version 2.16.0.
- 3. For Java 7 applications: Upgrade Apache Log4j from the affected version to version 2.12.2.
- 4. Verify the upgrade by checking the Log4j library file (e.g., log4j-core-2.16.0.jar or log4j-core-2.12.2.jar) is present in your application dependencies.
- 5. Test the application to ensure logging functionality works correctly after the upgrade.
- 6. Scan for any other instances of vulnerable Log4j versions in your dependencies and transitive dependencies.
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation8.0 h
- Implementation12.0 h
- Testing8.0 h
- Review / QA4.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $9,088.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2021-45046 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sources- www.oracle.com
- logging.apache.org
- www.openwall.com
- www.oracle.com
- www.openwall.com
- www.openwall.com
- cert-portal.siemens.com
- cert-portal.siemens.com
- cert-portal.siemens.com
- cert-portal.siemens.com
- psirt.global.sonicwall.com
- security.gentoo.org
- tools.cisco.com
- www.debian.org
- www.intel.com
- www.kb.cert.org
- www.oracle.com
- www.oracle.com
- www.oracle.com
- lists.fedoraproject.org
- lists.fedoraproject.org
- www.cve.org
- www.cisa.gov
- nvd.nist.gov
Practitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2021-45046 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data