{
  "cveId": "CVE-2023-31038",
  "url": "https://patchblox.com/security/cve/CVE-2023-31038",
  "summary": "CVE-2023-31038 is fixed in log4cxx on 1 platform, first by DEBIAN-CVE-2023-31038, released May 8, 2023. It is not reported as exploited. Patch Radar priority: High.",
  "title": "log4cxx: SQL injection in Log4cxx when using the ODBC appender to send log messages to a database.\u00A0 No fields sent to the data...",
  "description": "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\u002B\u002B framework, so only C\u002B\u002B 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=\u0022SqlODBCAppender\u0022 class=\u0022ODBCAppender\u0022\u003E  \u00A0\u00A0\u00A0 \u003Cparam name=\u0022sql\u0022 value=\u0022INSERT INTO logs (message) VALUES (\u0027%m\u0027)\u0022 /\u003E  \u00A0\u00A0\u00A0 ... other params here ...  \u003C/appender\u003E     The migrated configuration snippet with new ColumnMapping parameters:   \u003Cappender name=\u0022SqlODBCAppender\u0022 class=\u0022ODBCAppender\u0022\u003E     \u00A0 \u00A0 \u003Cparam name=\u0022sql\u0022 value=\u0022INSERT INTO logs (message) VALUES (?)\u0022 /\u003E  \u00A0\u00A0\u00A0 \u003Cparam name=\u0022ColumnMapping\u0022 value=\u0022message\u0022/\u003E \u00A0\u00A0\u00A0 ... other params here ...   \u003C/appender\u003E",
  "published": "2023-05-08T09:15:09Z",
  "severity": "high",
  "cvss": 8.8,
  "cvssVector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
  "epss": 0.01597,
  "epssPercentile": 0.75924,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "log4cxx",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "1.1.0-1",
      "fix": "DEBIAN-CVE-2023-31038",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2023-31038",
      "released": "2023-05-08T09:15:09Z"
    },
    {
      "platform": "linux",
      "product": "log4cxx",
      "release": "Debian 14",
      "fixedVersion": "1.1.0-1",
      "fix": "DEBIAN-CVE-2023-31038",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2023-31038",
      "released": "2023-05-08T09:15:09Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-09T01:18:40Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}