Read the docs
TI-2023-14775 Aliases CVE-2023-31038GHSA-76cx-3v2m-9952

Apache Log4cxx: SQL injection when using ODBC appender

Priority MEDIUM 43CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
SQL injection
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA. Impact type from CWE-89.

Summary

SQL injection in Log4cxx when using the ODBC appender to send log messages to a database.  No fields sent to the database were properly escaped for SQL injection.  This has been the case since at least version 0.9.0(released 2003-08-06) Note that Log4cxx is a C++ framework, so only C++ applications are affected. Before version 1.1.0, the ODBC appender was automatically part of Log4cxx if the library was found when compiling the library.  As of version 1.1.0, this must be both explicitly enabled in order to be compiled in. Three preconditions must be met for this vulnerability to be possible: 1. Log4cxx compiled with ODBC support(before version 1.1.0, this was auto-detected at compile time) 2. ODBCAppender enabled for logging messages to, generally done via a config file 3. User input is logged at some point. If your application does not have user input, it is unlikely to be affected. Users are recommended to upgrade to version 1.1.0 which properly binds the parameters to the SQL statement, or migrate to the new DBAppender class which supports an ODBC connection in addition to other databases. Note that this fix does require a configuration file update, as the old configuration files will not configure properly.  An example is shown below, and more information may be found in the Log4cxx documentation on the ODBCAppender. Example of old configuration snippet: <appender name="SqlODBCAppender" class="ODBCAppender">     <param name="sql" value="INSERT INTO logs (message) VALUES ('%m')" />     ... other params here ... </appender> The migrated configuration snippet with new ColumnMapping parameters: <appender name="SqlODBCAppender" class="ODBCAppender">     <param name="sql" value="INSERT INTO logs (message) VALUES (?)" />     <param name="ColumnMapping" value="message"/>     ... other params here ... </appender>

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01597 75th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed Apache Log4cxx (Apache Software Foundation): 1.1.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ApacheApache Log4cxx0.9.0 to before 1.1.01.1.0Patch availableCNA
  • Apache Log4cxx VendorApache Affected 0.9.0 to before 1.1.0 Fixed in 1.1.0 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:apache:log4cxx:*:*:*:*:*:*:*:*0.9.0 to before 1.1.0VulnerableApache
  • cpe:2.3:a:apache:log4cxx:*:*:*:*:*:*:*:* Versions 0.9.0 to before 1.1.0 Vulnerable ·Apache

Remediation

  • Fix · CNA Apache Log4cxx (Apache Software Foundation) Fixed in 1.1.0

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat Enterprise Linux 7

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-31038
  2. 2026-10-03 Alias added: GHSA-76cx-3v2m-9952

References

  • TI-2025-34567 Apache Log4cxx: Improper escaping with JSONLayout CVSS 4.0MEDIUM 6.3
  • TI-2026-28866 Improper output encoding in Apache Log4cxx CVSS 4.0MEDIUM 6.3
  • TI-2025-34566 Apache Log4cxx: Improper HTML escaping in HTMLLayout CVSS 4.0LOW 2.1

Sources