CVE-2022-23305
JSON

9.8critical

SQL injection in JDBC Appender in Apache Log4j V1

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
66.5% (higher than 99% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
apache
Also known as
GHSA-65fg-84f6-3jq3

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.

Affected

Product or packageVersionsReported by
Apache Software Foundation Apache Log4j 1.xfrom 1.2.1 before unspecified, from unspecified before 2.0-alpha1CVE List
log4j:log4j (Maven)up to 1.2.17GitHub Advisory Database
org.zenframework.z8.dependencies.commons:log4j-1.2.17 (Maven)up to 2.0GitHub Advisory Database
apache log4jfrom 1.2 up to 1.2.17NVD
netapp snapmanagerNot specifiedNVD
broadcom brocade_sannavNot specifiedNVD
qos reload4jbefore 1.2.18.2NVD
oracle advanced_supply_chain_planning12.1, 12.2NVD
oracle business_intelligence5.9.0.0.0, 12.2.1.3.0, 12.2.1.4.0NVD
oracle business_process_management_suite12.2.1.3.0, 12.2.1.4.0NVD
oracle communications_eagle_ftp_table_base_retrieval4.5NVD
oracle communications_instant_messaging_server10.0.1.5.0NVD

All scores

CISA-ADP9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

NVD (es)

Por diseño, el JDBCAppender en Log4j versiones 1.2.x, acepta una sentencia SQL como parámetro de configuración donde los valores a insertar son convertidores de PatternLayout. Es probable que el convertidor de mensajes, %m, sea incluido siempre. Esto permite a atacantes manipular el SQL introduciendo cadenas diseñadas en los campos de entrada o en los encabezados de una aplicación que son registradas permitiendo una ejecución de consultas SQL no deseadas. Tenga en cuenta que este problema sólo afecta a Log4j versiones 1.x cuando es configurado específicamente para usar el JDBCAppender, que no es el predeterminado. A partir de la versión 2.0-beta8, fue reintroducido el JDBCAppender con soporte apropiado para consultas SQL parametrizadas y mayor personalización sobre las columnas escritas en los registros. Apache Log4j versiones 1.2 llegó al final de su vida útil en agosto de 2015. Los usuarios deberían actualizar a Log4j 2, ya que aborda numerosos problemas de las versiones anteriores

References

Sources

SourceRecordLicence
CVE ListCVE-2022-23305 changed 2026-05-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-65fg-84f6-3jq3 changed 2026-06-08CC-BY-4.0
NVDCVE-2022-23305 changed 2026-06-17Public domain