UBUNTU-CVE-2023-31038 (CVE-2023-31038)
Vulnerability from osv_ubuntu – Published: 2023-05-08 09:15 – Updated: 2026-12-01 22:07 – Source websiteSQL 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: ... other params here ... The migrated configuration snippet with new ColumnMapping parameters: ... other params here ...
| Ecosystem | Package | Version |
|---|---|---|
| Ubuntu:Pro:14.04:LTS |
log4cxx
pkg:deb/ubuntu/log4cxx@0.10.0-1.2ubuntu3+esm1?arch=source&distro=esm-infra-legacy/trusty
|
Affected: All versions (ecosystem)
0.10.0-1.2ubuntu30.10.0-1.2ubuntu3+esm1
|
| Ubuntu:Pro:16.04:LTS |
log4cxx
pkg:deb/ubuntu/log4cxx@0.10.0-10ubuntu1+esm1?arch=source&distro=esm-apps-legacy/xenial
|
Affected: All versions (ecosystem)
0.10.0-9ubuntu10.10.0-9ubuntu20.10.0-10ubuntu10.10.0-10ubuntu1+esm1
|
| Ubuntu:Pro:18.04:LTS |
log4cxx
pkg:deb/ubuntu/log4cxx@0.10.0-13ubuntu2+esm1?arch=source&distro=esm-apps/bionic
|
Affected: All versions (ecosystem)
0.10.0-12ubuntu10.10.0-13ubuntu10.10.0-13ubuntu20.10.0-13ubuntu2+esm1
|
| Ubuntu:Pro:20.04:LTS |
log4cxx
pkg:deb/ubuntu/log4cxx@0.10.0-15ubuntu2+esm1?arch=source&distro=esm-apps/focal
|
Affected: All versions (ecosystem)
0.10.0-15ubuntu10.10.0-15ubuntu20.10.0-15ubuntu2+esm1
|
| Ubuntu:Pro:22.04:LTS |
log4cxx
pkg:deb/ubuntu/log4cxx@0.12.1-4ubuntu0.1~esm1?arch=source&distro=esm-apps/jammy
|
Affected: All versions (ecosystem)
0.11.0-2ubuntu10.11.0-3ubuntu20.12.1-40.12.1-4ubuntu0.1~esm1
|
| Ubuntu:Pro:24.04:LTS |
log4cxx
pkg:deb/ubuntu/log4cxx@1.1.0-1ubuntu0.1~esm1?arch=source&distro=esm-apps/noble
|
Affected: All versions (ecosystem)
1.1.0-11.1.0-1build11.1.0-1build21.1.0-1build31.1.0-1ubuntu0.1~esm1
|
| Ubuntu:25.10 |
log4cxx
pkg:deb/ubuntu/log4cxx@1.4.0-1?arch=source&distro=questing
|
Affected: All versions (ecosystem)
1.3.1-11.4.0-1
|
| Ubuntu:26.10 |
log4cxx
pkg:deb/ubuntu/log4cxx@1.5.0-1?arch=source&distro=stonking
|
Affected: All versions (ecosystem)
1.5.0-1
|
| Ubuntu:26.04:LTS |
log4cxx
pkg:deb/ubuntu/log4cxx@1.5.0-1?arch=source&distro=resolute
|
Affected: All versions (ecosystem)
1.4.0-11.5.0-1
|
{
"affected": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx10",
"binary_version": "0.10.0-1.2ubuntu3+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:14.04:LTS",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@0.10.0-1.2ubuntu3+esm1?arch=source\u0026distro=esm-infra-legacy/trusty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.10.0-1.2ubuntu3",
"0.10.0-1.2ubuntu3+esm1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx10v5",
"binary_version": "0.10.0-10ubuntu1+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@0.10.0-10ubuntu1+esm1?arch=source\u0026distro=esm-apps-legacy/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.10.0-9ubuntu1",
"0.10.0-9ubuntu2",
"0.10.0-10ubuntu1",
"0.10.0-10ubuntu1+esm1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx10v5",
"binary_version": "0.10.0-13ubuntu2+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:18.04:LTS",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@0.10.0-13ubuntu2+esm1?arch=source\u0026distro=esm-apps/bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.10.0-12ubuntu1",
"0.10.0-13ubuntu1",
"0.10.0-13ubuntu2",
"0.10.0-13ubuntu2+esm1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx10v5",
"binary_version": "0.10.0-15ubuntu2+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:20.04:LTS",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@0.10.0-15ubuntu2+esm1?arch=source\u0026distro=esm-apps/focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.10.0-15ubuntu1",
"0.10.0-15ubuntu2",
"0.10.0-15ubuntu2+esm1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx12",
"binary_version": "0.12.1-4ubuntu0.1~esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:22.04:LTS",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@0.12.1-4ubuntu0.1~esm1?arch=source\u0026distro=esm-apps/jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.11.0-2ubuntu1",
"0.11.0-3ubuntu2",
"0.12.1-4",
"0.12.1-4ubuntu0.1~esm1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx15",
"binary_version": "1.1.0-1ubuntu0.1~esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:24.04:LTS",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@1.1.0-1ubuntu0.1~esm1?arch=source\u0026distro=esm-apps/noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.1.0-1",
"1.1.0-1build1",
"1.1.0-1build2",
"1.1.0-1build3",
"1.1.0-1ubuntu0.1~esm1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx15",
"binary_version": "1.4.0-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:25.10",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@1.4.0-1?arch=source\u0026distro=questing"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.3.1-1",
"1.4.0-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx15",
"binary_version": "1.5.0-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.10",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@1.5.0-1?arch=source\u0026distro=stonking"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.5.0-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "liblog4cxx15",
"binary_version": "1.5.0-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.04:LTS",
"name": "log4cxx",
"purl": "pkg:deb/ubuntu/log4cxx@1.5.0-1?arch=source\u0026distro=resolute"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.4.0-1",
"1.5.0-1"
]
}
],
"aliases": [],
"details": "SQL injection in Log4cxx when using the ODBC appender to send log messages to a database.\u00a0 No fields sent to the database were properly escaped for SQL injection.\u00a0 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.\u00a0 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.\u00a0 An example is shown below, and more information may be found in the Log4cxx documentation on the ODBCAppender. Example of old configuration snippet: \u003cappender name=\"SqlODBCAppender\" class=\"ODBCAppender\"\u003e \u00a0\u00a0\u00a0 \u003cparam name=\"sql\" value=\"INSERT INTO logs (message) VALUES (\u0027%m\u0027)\" /\u003e \u00a0\u00a0\u00a0 ... other params here ... \u003c/appender\u003e The migrated configuration snippet with new ColumnMapping parameters: \u003cappender name=\"SqlODBCAppender\" class=\"ODBCAppender\"\u003e \u00a0 \u00a0 \u003cparam name=\"sql\" value=\"INSERT INTO logs (message) VALUES (?)\" /\u003e \u00a0\u00a0\u00a0 \u003cparam name=\"ColumnMapping\" value=\"message\"/\u003e \u00a0\u00a0\u00a0 ... other params here ... \u003c/appender\u003e",
"id": "UBUNTU-CVE-2023-31038",
"modified": "2026-12-01T22:07:24Z",
"published": "2023-05-08T09:15:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2023-31038"
},
{
"type": "REPORT",
"url": "https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2023-31038"
}
],
"related": [],
"schema_version": "1.9.2",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"source": "NVD",
"type": "CVSS_V3"
},
{
"score": "medium",
"source": "SELF",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2023-31038"
]
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.