Log4jFramework / library · Apache

CVE-2022-23305

CRITICAL · 9.8 CVSS v3.1 Published 2022-01-18
Fix available
A fix is available. Upgrade to 1.2.18.2 or later.
See remediation →
100/100
Remediation priority · Urgent
High EPSS Remotely reachable No privileges Zero-click Patch available

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 · unedited
By design, the JDBCAppender in Log4j 1.2.x accepts an SQL statement as a configuration parameter where the values to be inserted are converters from PatternLayout. The message converter, %m, is likely to always be included. This allows attackers to manipulate the SQL by entering crafted strings into input fields or headers of an application that are logged allowing unintended SQL queries to be executed. Note this issue only affects Log4j 1.x when specifically configured to use the JDBCAppender, which is not the default. Beginning in version 2.0-beta8, the JDBCAppender was re-introduced with proper support for parameterized SQL queries and further customization over the columns written to in logs. 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.

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
How this class of weakness works · CWE-89

User input is woven into a database query, letting an attacker rewrite the query's logic. From there they can read, alter, or destroy data — frequently the entire database. The reliable fix is parameterised queries (prepared statements), so input is always treated as data and never as SQL.

General guidance for the sql injection class — the official description and references above are authoritative for this specific CVE. Want a bespoke review and a reviewed fix? Ask our team →

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
Log4jFramework / library
Affected:>= 1.2, <= 1.2.17
SnapmanagerApplication
Affected:all versions
Brocade SannavApplication
Affected:all versions
Reload4jApplication
Affected:< 1.2.18.2
Advanced Supply Chain PlanningApplication
Affected:= 12.1= 12.2
Business IntelligenceApplication
Affected:= 5.9.0.0.0= 12.2.1.3.0= 12.2.1.4.0
Business Process Management SuiteApplication
Affected:= 12.2.1.3.0= 12.2.1.4.0
Communications Eagle Ftp Table Base RetrievalApplication
Affected:= 4.5

CVSS 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
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

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 · scoped
Upgrade available Upgrade to 1.2.18.2 or later
Fixed in 1.2.18.2
Vendor patch www.oracle.com →
Recommended fix High confidence

Log4j 2.x (latest stable 2.x release) or reload4j 1.2.18.2+

  1. 1. Identify all applications and systems using Log4j 1.x with JDBCAppender configuration
  2. 2. Review application configurations (log4j.xml or log4j.properties) for JDBCAppender usage
  3. 3. For Java applications: upgrade from Log4j 1.x to Log4j 2.x (recommended) or to reload4j 1.2.18.2 or later
  4. 4. If using Maven/Gradle, update dependency: change 'log4j:log4j:1.2.17' to 'org.apache.logging.log4j:log4j-core:2.x' or 'org.reload4j:reload4j:1.2.18.2'
  5. 5. Update JDBCAppender configuration in log4j2.xml to use parameterized SQL queries (e.g., <SqlParameter> elements) rather than string concatenation
  6. 6. Test the application to ensure logging functionality works correctly with the new configuration
  7. 7. Redeploy all affected applications
Caveat Log4j 2.x has API differences from 1.x; configuration files must be migrated from log4j.xml/properties to log4j2.xml format; JDBCAppender configuration syntax changes

Generated from the published advisory — verify against the referenced sources before acting.

We can perform the upgrade in your staging environment and verify nothing breaks — typical engagement from $2,300. Get the upgrade done

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-23305 — 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

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-23305 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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