CVE-2023-31038
No exploitation reported by the sources we read.
- Published2023-05-08
- Fixed in1.1.0
- WeaknessCWE-89
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
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>
Timeline
dates in UTC- 2023-05-0809:15CVE publishedNVD
Versions per branch
NVD · CISA-ADP| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 1.1 | ≥ 0.9.0, < 1.1.0 | 1.1.0 | NVD · CISA-ADP |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As apache, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- Apache Software Foundation Apache Log4cxxother versions: not affectedAffected
- ≥ 0.9.0, < 1.1.0fixed in 1.1.0semver
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2023-05-08
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- log4cxxUbuntu:26.10all versions · no fixed version listed
- log4cxxUbuntu:26.04:LTSall versions · no fixed version listed
- log4cxxUbuntu:25.10all versions · no fixed version listed
- log4cxxUbuntu:24.04:LTSall versions · no fixed version listed
- log4cxxUbuntu:22.04:LTSall versions · no fixed version listed
- log4cxxUbuntu:20.04:LTSall versions · no fixed version listed
- log4cxxUbuntu:18.04:LTSall versions · no fixed version listed
- log4cxxUbuntu:16.04:LTSall versions · no fixed version listed
6 more package ranges on OSV.dev
Vendor advisories
- CVE-2023-31038 Red Hat Product Security
log4cxx: SQL injection in Log4cxx when using the ODBC appender to send log messages to a database
Fix
- Update Apache log4cxx to 1.1.0
Advisories and patches
- lists.apache.orgVendor Advisory
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2024-10-15
- CISA-ADPCVSS 3.18.82024-10-15
- NVDCVSS 3.18.8read 2026-10-23
- CNAweakness (CWE)CWE-89known since 2026-10-23
- FIRST EPSSEPSS score1.6 %2026-11-08
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- EUVD-2023-35375same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-76cx-3v2m-9952same flawGitHub Advisory Database · CC-BY-4.0
- openSUSE-SU-2024:13545-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Published
- 2023-05-08
- Last Modified
- 2026-06-17
- NVD status
- Modified
- GitHub Advisory
- GHSA-76cx-3v2m-9952
Frequently asked questions
What is CVE-2023-31038?
Is CVE-2023-31038 actively exploited?
What is the CVSS score for CVE-2023-31038?
Running log4cxx? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-76cx-3v2m-9952
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0