CVE-2022-23305SQL injection in JDBC Appender in Apache Log4j V1
- 9.8CriticalCVSS base score
- 66.5%Exploitation in 30 daysEPSS · top 0.7% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By apache
- 1 day later
· 1 day later
Published
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 66.5% · top 0.7% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Affected products
Apache Software Foundation · Apache Log4j 1.x
- affected 1.2.1 – < unspecified
- affected unspecified – < 2.0-alpha1
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenlog4j:log4jGHSA-65fg-84f6-3jq3 (opens in a new tab)
- Mavenorg.zenframework.z8.dependencies.commons:log4j-1.2.17GHSA-65fg-84f6-3jq3 (opens in a new tab)
What to do
Workaround: Users should upgrade to Log4j 2 or remove usage of the JDBCAppender from their configurations.
References
References6
- https://logging.apache.org/log4j/1.2/index.html (opens in a new tab)x_refsource_MISCx_transferred
- https://lists.apache.org/thread/pt6lh3pbsvxqlwlp4c5l798dv2hkc85y (opens in a new tab)x_refsource_MISCx_transferred
- [oss-security] 20220118 CVE-2022-23305: SQL injection in JDBC Appender in Apache Log4j V1 (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- https://www.oracle.com/security-alerts/cpuapr2022.html (opens in a new tab)x_refsource_MISCx_transferred
- https://security.netapp.com/advisory/ntap-20220217-0007/ (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://www.oracle.com/security-alerts/cpujul2022.html (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-0477 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-65fg-84f6-3jq3 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-23305)Record last updated .