{"id":"CVE-2022-23305","published":"2022-01-18T15:25:22Z","modified":"2026-05-27T13:40:57Z","title":"SQL injection in JDBC Appender in Apache Log4j V1","vendor":"Apache Software Foundation","product":"Apache Log4j 1.x","tier":"core","eol":null,"affectedVersions":[{"vendor":"Apache Software Foundation","product":"Apache Log4j 1.x","versions":[">= 1.2.1, < unspecified",">= unspecified, < 2.0-alpha1"]}],"workarounds":{"items":["Users should upgrade to Log4j 2 or remove usage of the JDBCAppender from their configurations."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-05-22T13:32:51.484506Z","from":"CISA ADP","provenance":"source"},"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The JDBCAppender in Apache Log4j 1.x accepts an SQL statement as a configuration parameter whose inserted values come from PatternLayout converters, and the message converter (%m) is likely to always be included, so it is affected only when that appender is explicitly configured. An attacker who can get crafted strings into application input fields or headers that get logged can inject SQL and have unintended queries executed over the network, without authentication or user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T03:44:42Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.66537,"percentile":0.99303,"date":"2026-11-20","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":6,"pulses":[{"name":"ACTUALIZACION | Oracle Critical Patch Update Advisory - April 2026","url":"https://otx.alienvault.com/pulse/6a04aeed763730d81a39cece","created":"2026-05-13"},{"name":"ACTUALIZACION | Oracle Critical Patch Update Advisory - July 2023","url":"https://otx.alienvault.com/pulse/64bace8d5d470a6a7baaa8a9","created":"2023-07-21"},{"name":"Oracle Critical Patch Update Advisory - April 2022","url":"https://otx.alienvault.com/pulse/626040216e00cd388b1b9180","created":"2022-04-20"},{"name":"Actualización |  de seguridad Red Hat JBoss Data Virtualization","url":"https://otx.alienvault.com/pulse/62094e1c70961be572ac7d86","created":"2022-02-13"},{"name":"ACTUALIZACION | actualización de seguridad para log4j12 | SUSE","url":"https://otx.alienvault.com/pulse/61f580ae2be11e5769dbc54b","created":"2022-01-29"},{"name":"Apache Log4j Multiple Vulnerabilities","url":"https://otx.alienvault.com/pulse/61ee36dd810688c8ddf07734","created":"2022-01-24"}],"provenance":"machine"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://logging.apache.org/log4j/1.2/index.html","tags":["x_refsource_MISC"]},{"url":"https://lists.apache.org/thread/pt6lh3pbsvxqlwlp4c5l798dv2hkc85y","tags":["x_refsource_MISC"]},{"url":"http://www.openwall.com/lists/oss-security/2022/01/18/4","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://www.oracle.com/security-alerts/cpuapr2022.html","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20220217-0007/","tags":["x_refsource_CONFIRM"]},{"url":"https://www.oracle.com/security-alerts/cpujul2022.html","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Maven","package":"log4j:log4j","vulnerableRanges":["<=1.2.17"],"patched":[],"from":["GHSA-65fg-84f6-3jq3"],"provenance":"source"},{"ecosystem":"Maven","package":"org.zenframework.z8.dependencies.commons:log4j-1.2.17","vulnerableRanges":["<=2.0"],"patched":[],"from":["GHSA-65fg-84f6-3jq3"],"provenance":"source"}],"advisories":[{"id":"GHSA-65fg-84f6-3jq3","url":"https://github.com/advisories/GHSA-65fg-84f6-3jq3","severity":"CRITICAL","ecosystem":"Maven","package":"log4j:log4j","vulnerableRanges":["<=1.2.17"],"patched":[],"provenance":"source","from":"GHSA"},{"id":"GHSA-65fg-84f6-3jq3","url":"https://github.com/advisories/GHSA-65fg-84f6-3jq3","severity":"CRITICAL","ecosystem":"Maven","package":"org.zenframework.z8.dependencies.commons:log4j-1.2.17","vulnerableRanges":["<=2.0"],"patched":[],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2022-0477","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-0477","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":3,"skipped":1,"earliest":"2021-12-14","earliestUrl":"https://github.com/HynekPetrak/log4shell-finder","repos":[{"name":"HynekPetrak/log4shell-finder","url":"https://github.com/HynekPetrak/log4shell-finder","stars":39,"created":"2021-12-14"},{"name":"AlphabugX/CVE-2022-RCE","url":"https://github.com/AlphabugX/CVE-2022-RCE","stars":5,"created":"2022-01-21"},{"name":"tkomlodi/CVE-2022-23305_POC","url":"https://github.com/tkomlodi/CVE-2022-23305_POC","stars":1,"created":"2023-07-24"}]},"first":{"date":"2021-12-14","source":"PoC-in-GitHub","url":"https://github.com/HynekPetrak/log4shell-finder"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2021-12-14","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/HynekPetrak/log4shell-finder","provenance":"source"},{"date":"2022-01-18","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2022-23305","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":33.6,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.86,"detail":"percentile 0.9930"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"3 PoC-in-GitHub repos"},{"name":"Mentioned in OTX pulses","points":1.92,"detail":"6 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}