CVE-2022-23305

CVE-2022-23305 is a critical-severity vulnerability in Apache Log4j with a CVSS 3.x base score of 9.8. Its EPSS exploit-prediction score of 67% places it in the 99th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-89.

Key facts

Description

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.

Frequently asked questions

What is CVE-2022-23305?
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.
How severe is CVE-2022-23305?
CVE-2022-23305 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2022-23305 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 67% (99th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2022-23305?
CVE-2022-23305 primarily affects Apache Log4j. In total, 42 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2022-23305?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
When was CVE-2022-23305 published?
CVE-2022-23305 was published on 2022-01-18 and last updated on 2026-06-17.

References

Affected products (42)

More vulnerabilities in Apache Log4j

All CVEs affecting Apache Log4j →

Other CWE-89 (SQL Injection) vulnerabilities

Browse all CWE-89 (SQL Injection) vulnerabilities →