UBUNTU-CVE-2023-31038

Source
https://ubuntu.com/security/CVE-2023-31038
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-31038.json
JSON Data
https://api.test.osv.dev/v1/vulns/UBUNTU-CVE-2023-31038
Related
Published
2023-05-08T09:15:00Z
Modified
2024-12-18T16:32:35Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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>

References

Affected packages

Ubuntu:Pro:14.04:LTS / log4cxx

Package

Name
log4cxx
Purl
pkg:deb/ubuntu/log4cxx?arch=src?distro=esm-infra-legacy/trusty

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.10.0-1.2ubuntu3

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:Pro:16.04:LTS / log4cxx

Package

Name
log4cxx
Purl
pkg:deb/ubuntu/log4cxx?arch=src?distro=esm-apps/xenial

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.10.0-9ubuntu1
0.10.0-9ubuntu2
0.10.0-10ubuntu1

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:Pro:18.04:LTS / log4cxx

Package

Name
log4cxx
Purl
pkg:deb/ubuntu/log4cxx?arch=src?distro=esm-apps/bionic

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.10.0-12ubuntu1
0.10.0-13ubuntu1
0.10.0-13ubuntu2

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:20.04:LTS / log4cxx

Package

Name
log4cxx
Purl
pkg:deb/ubuntu/log4cxx?arch=src?distro=focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.10.0-15ubuntu1
0.10.0-15ubuntu2

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:22.04:LTS / log4cxx

Package

Name
log4cxx
Purl
pkg:deb/ubuntu/log4cxx?arch=src?distro=jammy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.11.0-2ubuntu1
0.11.0-3ubuntu2
0.12.1-4

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:24.10 / log4cxx

Package

Name
log4cxx
Purl
pkg:deb/ubuntu/log4cxx?arch=src?distro=oracular

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*

1.1.0-1build3
1.2.0-1

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:24.04:LTS / log4cxx

Package

Name
log4cxx
Purl
pkg:deb/ubuntu/log4cxx?arch=src?distro=noble

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*

1.1.0-1
1.1.0-1build1
1.1.0-1build2
1.1.0-1build3

Ecosystem specific

{
    "ubuntu_priority": "medium"
}