cve.bz

CVE-2022-23305 SQL Injection

9.8 criticalEPSS 67%Fix available

Critical (9.8). EPSS 67% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
67% (unchanged from 67% a week ago; 67% 30 days ago) estimated probability of exploitation activity in the next 30 days; 99th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2026-05-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-23305 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-23305?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-23305?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-23305 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache Log4j 1.xfrom 1.2.1 before unspecified
Apache Software Foundation Apache Log4j 1.xbefore 2.0-alpha1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-65fg-84f6-3jq3Mavenlog4j:log4j<=1.2.17no fix published
GHSA-65fg-84f6-3jq3Mavenorg.zenframework.z8.dependencies.commons:log4j-1.2.17<=2.0no fix published

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9apache-log4j1.21.2.17-7+deb9u2DLA-2905-1
Debian12, 13, 14apache-log4j1.21.2.17-11DEBIAN-CVE-2022-23305
Ubuntu18.04:LTSapache-log4j1.21.2.17-8+deb10u1ubuntu0.2UBUNTU-CVE-2022-23305 USN-5998-1
Ubuntu20.04:LTSapache-log4j1.21.2.17-9ubuntu0.2UBUNTU-CVE-2022-23305 USN-5998-1
UbuntuPro:14.04:LTSapache-log4j1.21.2.17-4ubuntu3+esm2UBUNTU-CVE-2022-23305 USN-7590-1
UbuntuPro:16.04:LTSapache-log4j1.21.2.17-7ubuntu1+esm1UBUNTU-CVE-2022-23305 USN-5998-1
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstation and 7 morelog4j, log4j-manual, log4j-javadoc0:1.2.17-18.el7_4RHSA-2022:0442
Red Hatenterprise_linux:7::computenodelog4j-manual, log4j-javadoc0:1.2.17-18.el7_4RHSA-2022:0442
Red Hatenterprise_linux:8::appstreamparfait, parfait-javadoc, parfait-examples and 1 more0:0.5.4-4.module+el8.5.0+13988+de2b8c0bRHSA-2022:0290
Red Hatenterprise_linux:8::appstreamsi-units, si-units-javadoc0:0.6.5-2.module+el8+2463+615f6896RHSA-2022:0290
Red Hatenterprise_linux:8::appstreamunit-api, unit-api-javadoc0:1.0-5.module+el8+2463+615f6896RHSA-2022:0290
Red Hatenterprise_linux:8::appstreamuom-lib, uom-lib-javadoc0:1.0.1-6.module+el8+2463+615f6896RHSA-2022:0290
Red Hatenterprise_linux:8::appstreamuom-parent0:1.0.3-3.module+el8+2463+615f6896RHSA-2022:0290
Red Hatenterprise_linux:8::appstreamuom-se, uom-se-javadoc0:1.0.4-3.module+el8+2463+615f6896RHSA-2022:0290
Red Hatenterprise_linux:8::appstreamuom-systems, uom-systems-javadoc0:0.7-1.module+el8+2463+615f6896RHSA-2022:0290
Red Hatjboss_enterprise_application_platform:6::el6jboss-as-ee, jboss-as-cli, jboss-as-cmp and 59 more0:7.5.24-2.Final_redhat_00001.1.ep6.el6RHSA-2022:5459
Red Hatjboss_enterprise_application_platform:6::el6jbossas-javadocs0:7.5.24-1.Final_redhat_00001.1.ep6.el6RHSA-2022:5459
Red Hatjboss_enterprise_application_platform:6::el6jbossts1:4.17.45-2.Final_redhat_2.1.ep6.el6RHSA-2022:5459
65 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 7 morelog4j1.2.17-5.9.1SUSE-SU-2022:0214-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 9 morelog4j121.2.17-4.9.1SUSE-SU-2022:0226-1
SUSEHPE Helion OpenStack 8venv-openstack-horizon-hpe12.0.5~dev6-14.46.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 11 morelog4j1.2.15-126.9.1SUSE-SU-2022:0212-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-aodh5.1.1~dev7-12.40.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-barbican5.0.2~dev3-12.41.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-ceilometer9.0.8~dev7-12.38.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-cinder11.2.3~dev29-14.42.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-designate5.0.3~dev7-12.39.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-freezer5.0.0.0~xrc2~dev2-10.36.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-glance15.0.3~dev3-12.39.1SUSE-SU-2022:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-heat9.0.8~dev22-12.43.1SUSE-SU-2022:0355-1
54 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3kafka, kafka-kit2.1.0-bp153.2.6.1openSUSE-SU-2022:0038-1
openSUSELeap 15.3log4j1.2.17-5.9.1openSUSE-SU-2022:0214-1
openSUSELeap 15.3log4j121.2.17-4.9.1openSUSE-SU-2022:0226-1
AlmaLinux8parfait, parfait-javadoc, parfait-examples and 1 more0.5.4-4.module_el8.5.0+235+62ea7738ALSA-2022:0290
AlmaLinux8parfait, parfait-javadoc, parfait-examples and 1 more0.5.4-4.module_el8.5.0+2610+de2b8c0bALSA-2022:0290
AlmaLinux8si-units, si-units-javadoc0.6.5-2.module_el8.5.0+235+62ea7738ALSA-2022:0290
AlmaLinux8si-units, si-units-javadoc0.6.5-2.module_el8.5.0+2610+de2b8c0bALSA-2022:0290
AlmaLinux8unit-api, unit-api-javadoc1.0-5.module_el8.5.0+235+62ea7738ALSA-2022:0290
AlmaLinux8unit-api, unit-api-javadoc1.0-5.module_el8.5.0+2610+de2b8c0bALSA-2022:0290
AlmaLinux8uom-lib, uom-lib-javadoc1.0.1-6.module_el8.5.0+235+62ea7738ALSA-2022:0290
AlmaLinux8uom-lib, uom-lib-javadoc1.0.1-6.module_el8.5.0+2610+de2b8c0bALSA-2022:0290
AlmaLinux8uom-parent1.0.3-3.module_el8.5.0+235+62ea7738ALSA-2022:0290
AlmaLinux8uom-parent1.0.3-3.module_el8.5.0+2610+de2b8c0bALSA-2022:0290
AlmaLinux8uom-se, uom-se-javadoc1.0.4-3.module_el8.5.0+235+62ea7738ALSA-2022:0290
AlmaLinux8uom-se, uom-se-javadoc1.0.4-3.module_el8.5.0+2610+de2b8c0bALSA-2022:0290
2 more for AlmaLinux in the JSON.
Rocky Linux8parfait0:0.5.4-4.module+el8.5.0+728+553fbdb8RLSA-2022:0290
Rocky Linux8si-units0:0.6.5-2.module+el8.3.0+214+edf13b3fRLSA-2022:0290
Rocky Linux8unit-api0:1.0-5.module+el8.3.0+214+edf13b3fRLSA-2022:0290
Rocky Linux8uom-lib0:1.0.1-6.module+el8.3.0+214+edf13b3fRLSA-2022:0290
Rocky Linux8uom-parent0:1.0.3-3.module+el8.3.0+214+edf13b3fRLSA-2022:0290
Rocky Linux8uom-se0:1.0.4-3.module+el8.3.0+214+edf13b3fRLSA-2022:0290
Rocky Linux8uom-systems0:0.7-1.module+el8.3.0+214+edf13b3fRLSA-2022:0290

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Note this issue only affects Log4j 1.x when specifically configured to use the JDBCAppender, which is not the default.

Red Hat Satellite bundles log4j-over-slf4j with Candlepin, however, product is not affected as it uses logback framework for logging.

Red Hat Virtualization and OpenShift Container Platform in the OCP Metering stack (the Hive/Presto/Hadoop components) ship a vulnerable version of the log4j package, however JDBCAppender is not used. Therefore the impact of this vulnerability for these products is rated Low.

Red Hat's mitigation

These are the possible mitigations for this flaw for releases version 1.x:

- Comment out or remove JDBCAppender in the Log4j configuration if it is used

- Remove the JDBCAppender class from the server's jar files. For example:

```

zip -q -d log4j-*.jar org/apache/log4j/jdbc/JDBCAppender.class

```

ProductPackageStateAdvisory
EAP 6.4.24 releaseFixed 2022-06-30RHSA-2022:5458
EAP 6.4 log4j asynclog4jFixed 2022-02-03RHSA-2022:0437
Red Hat AMQ Streams 1.6.7Fixed 2022-02-08RHSA-2022:0467
Red Hat AMQ Streams 2.0.1log4jFixed 2022-02-08RHSA-2022:0469
Red Hat Data Grid 7.3.9log4jFixed 2022-02-03RHSA-2022:0430
Red Hat Enterprise Linux 6 Extended Lifecycle Supportlog4j-0:1.2.14-6.6.el6_10Fixed 2022-02-07RHSA-2022:0442
Red Hat Enterprise Linux 7log4j-0:1.2.17-18.el7_4Fixed 2022-02-07RHSA-2022:0442
Red Hat Enterprise Linux 7.3 Advanced Update Supportlog4j-0:1.2.17-17.el7_3Fixed 2022-02-07RHSA-2022:0442
Red Hat Enterprise Linux 7.4 Advanced Update Supportlog4j-0:1.2.17-18.el7_4Fixed 2022-02-07RHSA-2022:0442
Red Hat Enterprise Linux 7.6 Advanced Update Supportlog4j-0:1.2.17-18.el7_4Fixed 2022-02-07RHSA-2022:0442
A-MQ Clients 2log4jAffected
Red Hat AMQ Broker 7log4jAffected
Red Hat build of Quarkuslog4jNot affected
Red Hat Data Grid 8log4jNot affected
Red Hat Decision Manager 7log4jNot affected
Red Hat Enterprise Linux 7tomcatNot affected
Red Hat Integration Camel K 1log4jNot affected
Red Hat Integration Camel Quarkus 1log4jNot affected
Red Hat JBoss Enterprise Application Platform Expansion Packlog4jNot affected
Red Hat JBoss Fuse Service Works 6log4jOut of support scope
193 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-23305.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON