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 package | Versions | Reported by |
|---|---|---|
| Apache Software Foundation Apache Log4j 1.x | from 1.2.1 before unspecified, from unspecified before 2.0-alpha1 | CVE List |
| log4j:log4j (Maven) | up to 1.2.17 | GitHub Advisory Database |
| org.zenframework.z8.dependencies.commons:log4j-1.2.17 (Maven) | up to 2.0 | GitHub Advisory Database |
| apache log4j | from 1.2 up to 1.2.17 | NVD |
| netapp snapmanager | Not specified | NVD |
| broadcom brocade_sannav | Not specified | NVD |
| qos reload4j | before 1.2.18.2 | NVD |
| oracle advanced_supply_chain_planning | 12.1, 12.2 | NVD |
| oracle business_intelligence | 5.9.0.0.0, 12.2.1.3.0, 12.2.1.4.0 | NVD |
| oracle business_process_management_suite | 12.2.1.3.0, 12.2.1.4.0 | NVD |
| oracle communications_eagle_ftp_table_base_retrieval | 4.5 | NVD |
| oracle communications_instant_messaging_server | 10.0.1.5.0 | NVD |
| oracle communications_messaging_server | 8.1 | NVD |
| oracle communications_network_integrity | 7.3.6 | NVD |
| oracle communications_offline_mediation_controller | before 12.0.0.4.4, 12.0.0.5.0 | NVD |
| oracle communications_unified_inventory_management | 7.4.1, 7.4.2 | NVD |
| oracle e-business_suite_cloud_manager_and_cloud_backup_module | before 2.2.1.1.1, 2.2.1.1.1 | NVD |
| oracle e-business_suite_information_discovery | from 12.2.3 up to 12.2.11 | NVD |
| oracle enterprise_manager_base_platform | 13.4.0.0, 13.5.0.0 | NVD |
| oracle financial_services_revenue_management_and_billing_analytics | 2.7.0.0, 2.7.0.1, 2.8.0.0 | NVD |
| oracle healthcare_foundation | 8.1.0 | NVD |
| oracle hyperion_data_relationship_management | before 11.2.8.0 | NVD |
| oracle hyperion_infrastructure_technology | before 11.2.8.0 | NVD |
| oracle identity_management_suite | 12.2.1.3.0, 12.2.1.4.0 | NVD |
| oracle identity_manager_connector | 11.1.1.5.0 | NVD |
| oracle jdeveloper | 12.2.1.3.0 | NVD |
| oracle middleware_common_libraries_and_tools | 12.2.1.4.0 | NVD |
| oracle mysql_enterprise_monitor | up to 8.0.29 | NVD |
| oracle retail_extract_transform_and_load | 13.2.5 | NVD |
| oracle tuxedo | 12.2.2.0.0 | NVD |
| oracle weblogic_server | 12.2.1.3.0, 12.2.1.4.0, 14.1.1.0.0 | NVD |
All scores
| CISA-ADP | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.8medium CVSS:2.0 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Classification
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
| https://logging.apache.org/log4j/1.2/index.html | vendor-advisory, web | |
| https://lists.apache.org/thread/pt6lh3pbsvxqlwlp4c5l798dv2hkc85y | issue-tracking, mailing-list, vendor-advisory, web | |
| http://www.openwall.com/lists/oss-security/2022/01/18/4 | mailing-list, third-party-advisory, web | |
| https://www.oracle.com/security-alerts/cpuapr2022.html | patch, third-party-advisory, web | |
| https://security.netapp.com/advisory/ntap-20220217-0007/ | third-party-advisory | |
| https://www.oracle.com/security-alerts/cpujul2022.html | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-23305 | advisory | |
| https://github.com/apache/logging-log4j1 | package | |
| https://security.netapp.com/advisory/ntap-20220217-0007 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-23305 changed 2026-05-27 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-65fg-84f6-3jq3 changed 2026-06-08 | CC-BY-4.0 |
| NVD | CVE-2022-23305 changed 2026-06-17 | Public domain |