CVE-2023-31038 (GCVE-0-2023-31038)

Vulnerability from cvelistv5 – Published: 2023-05-08 08:54 – Updated: 2024-10-15 18:24
VLAI?
Title
Apache Log4cxx: SQL injection when using ODBC appender
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>
Severity ?
No CVSS data available.
CWE
  • CWE-89 - Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Assigner
References
Impacted products
Vendor Product Version
Apache Software Foundation Apache Log4cxx Affected: 0.9.0 , < 1.1.0 (semver)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T14:45:25.149Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "vendor-advisory",
              "x_transferred"
            ],
            "url": "https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "affected": [
          {
            "cpes": [
              "cpe:2.3:a:apache:log4cxx:*:*:*:*:*:*:*:*"
            ],
            "defaultStatus": "unknown",
            "product": "log4cxx",
            "vendor": "apache",
            "versions": [
              {
                "lessThan": "1.1.0",
                "status": "affected",
                "version": "0.9.0",
                "versionType": "custom"
              }
            ]
          }
        ],
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 8.8,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "HIGH",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2023-31038",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-10-15T18:22:48.423396Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-10-15T18:24:15.291Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Apache Log4cxx",
          "vendor": "Apache Software Foundation",
          "versions": [
            {
              "lessThan": "1.1.0",
              "status": "affected",
              "version": "0.9.0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "configurations": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Log4cxx must be built with ODBC support, and configured to log messages to a database for this to occur\u003cbr\u003e"
            }
          ],
          "value": "Log4cxx must be built with ODBC support, and configured to log messages to a database for this to occur\n"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cdiv\u003eSQL injection in Log4cxx when using the ODBC appender to send log messages to a database.\u0026nbsp; No fields sent to the database were properly escaped for SQL injection.\u0026nbsp; This has been the case since at least version 0.9.0(released 2003-08-06)\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eNote that Log4cxx is a C++ framework, so only C++ applications are affected.\u003c/div\u003e\u003cdiv\u003eBefore version 1.1.0, the ODBC appender was automatically part of Log4cxx if the library was found when compiling the library.\u0026nbsp; As of version 1.1.0, this must be both explicitly enabled in order to be compiled in.\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eThree preconditions must be met for this vulnerability to be possible:\u003c/div\u003e\u003cdiv\u003e1. Log4cxx compiled with ODBC support(before version 1.1.0, this was auto-detected at compile time)\u003c/div\u003e\u003cdiv\u003e2. ODBCAppender enabled for logging messages to, generally done via a config file\u003c/div\u003e\u003cdiv\u003e3. User input is logged at some point. If your application does not have user input, it is unlikely to be affected.\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eUsers 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. \u003cbr\u003eNote that this fix does require a configuration file update, as the old configuration files will not configure properly.\u0026nbsp; An example is shown below, and more information may be found in the Log4cxx documentation on the ODBCAppender.\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eExample of old configuration snippet:\u003c/div\u003e\u003cdiv\u003e\u0026lt;appender name=\"SqlODBCAppender\" class=\"ODBCAppender\"\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \u0026lt;param name=\"sql\" value=\"INSERT INTO logs (message) VALUES (\u0027%m\u0027)\" /\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; ... other params here ...\u003c/div\u003e\u003cdiv\u003e\u0026lt;/appender\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eThe migrated configuration snippet with new ColumnMapping parameters:\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u0026lt;appender name=\"SqlODBCAppender\" class=\"ODBCAppender\"\u0026gt;\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u003cdiv\u003e\u003c/div\u003e\u003cdiv\u003e\u0026nbsp; \u0026nbsp; \u0026lt;param name=\"sql\" value=\"INSERT INTO logs (message) VALUES (?)\" /\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \u0026lt;param name=\"ColumnMapping\" value=\"message\"/\u0026gt;\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; ... other params here ...\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u0026lt;/appender\u0026gt;\u003cbr\u003e\u003c/div\u003e\u003cbr\u003e\u003c/div\u003e"
            }
          ],
          "value": "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)\n\n\n\n\nNote that Log4cxx is a C++ framework, so only C++ applications are affected.\n\nBefore 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.\n\n\n\n\nThree preconditions must be met for this vulnerability to be possible:\n\n1. Log4cxx compiled with ODBC support(before version 1.1.0, this was auto-detected at compile time)\n\n2. ODBCAppender enabled for logging messages to, generally done via a config file\n\n3. User input is logged at some point. If your application does not have user input, it is unlikely to be affected.\n\n\n\n\n\nUsers 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. \nNote 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.\n\n\n\n\n\nExample of old configuration snippet:\n\n\u003cappender name=\"SqlODBCAppender\" class=\"ODBCAppender\"\u003e\n\n\u00a0\u00a0\u00a0 \u003cparam name=\"sql\" value=\"INSERT INTO logs (message) VALUES (\u0027%m\u0027)\" /\u003e\n\n\u00a0\u00a0\u00a0 ... other params here ...\n\n\u003c/appender\u003e\n\n\n\n\nThe migrated configuration snippet with new ColumnMapping parameters:\n\n\n\u003cappender name=\"SqlODBCAppender\" class=\"ODBCAppender\"\u003e\n\n\n\n\n\u00a0 \u00a0 \u003cparam name=\"sql\" value=\"INSERT INTO logs (message) VALUES (?)\" /\u003e\n\n\u00a0\u00a0\u00a0 \u003cparam name=\"ColumnMapping\" value=\"message\"/\u003e\n\u00a0\u00a0\u00a0 ... other params here ...\n\n\n\u003c/appender\u003e\n\n\n\n\n\n"
        }
      ],
      "metrics": [
        {
          "other": {
            "content": {
              "text": "6.8"
            },
            "type": "Textual description of severity"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-89",
              "description": "CWE-89 Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-05-08T08:54:10.234Z",
        "orgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
        "shortName": "apache"
      },
      "references": [
        {
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9"
        }
      ],
      "source": {
        "discovery": "INTERNAL"
      },
      "title": "Apache Log4cxx: SQL injection when using ODBC appender",
      "x_generator": {
        "engine": "Vulnogram 0.1.0-dev"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
    "assignerShortName": "apache",
    "cveId": "CVE-2023-31038",
    "datePublished": "2023-05-08T08:54:10.234Z",
    "dateReserved": "2023-04-22T18:15:20.678Z",
    "dateUpdated": "2024-10-15T18:24:15.291Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "fkie_nvd": {
      "configurations": "[{\"nodes\": [{\"operator\": \"OR\", \"negate\": false, \"cpeMatch\": [{\"vulnerable\": true, \"criteria\": \"cpe:2.3:a:apache:log4cxx:*:*:*:*:*:*:*:*\", \"versionStartIncluding\": \"0.9.0\", \"versionEndExcluding\": \"1.1.0\", \"matchCriteriaId\": \"DBA497A9-918F-4F82-8DD5-3627C6289513\"}]}]}]",
      "descriptions": "[{\"lang\": \"en\", \"value\": \"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)\\n\\n\\n\\n\\nNote that Log4cxx is a C++ framework, so only C++ applications are affected.\\n\\nBefore 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.\\n\\n\\n\\n\\nThree preconditions must be met for this vulnerability to be possible:\\n\\n1. Log4cxx compiled with ODBC support(before version 1.1.0, this was auto-detected at compile time)\\n\\n2. ODBCAppender enabled for logging messages to, generally done via a config file\\n\\n3. User input is logged at some point. If your application does not have user input, it is unlikely to be affected.\\n\\n\\n\\n\\n\\nUsers 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. \\nNote 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.\\n\\n\\n\\n\\n\\nExample of old configuration snippet:\\n\\n\u003cappender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u003e\\n\\n\\u00a0\\u00a0\\u00a0 \u003cparam name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (\u0027%m\u0027)\\\" /\u003e\\n\\n\\u00a0\\u00a0\\u00a0 ... other params here ...\\n\\n\u003c/appender\u003e\\n\\n\\n\\n\\nThe migrated configuration snippet with new ColumnMapping parameters:\\n\\n\\n\u003cappender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u003e\\n\\n\\n\\n\\n\\u00a0 \\u00a0 \u003cparam name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (?)\\\" /\u003e\\n\\n\\u00a0\\u00a0\\u00a0 \u003cparam name=\\\"ColumnMapping\\\" value=\\\"message\\\"/\u003e\\n\\u00a0\\u00a0\\u00a0 ... other params here ...\\n\\n\\n\u003c/appender\u003e\\n\\n\\n\\n\\n\\n\"}]",
      "id": "CVE-2023-31038",
      "lastModified": "2024-11-21T08:01:17.933",
      "metrics": "{\"cvssMetricV31\": [{\"source\": \"nvd@nist.gov\", \"type\": \"Primary\", \"cvssData\": {\"version\": \"3.1\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\", \"baseScore\": 8.8, \"baseSeverity\": \"HIGH\", \"attackVector\": \"NETWORK\", \"attackComplexity\": \"LOW\", \"privilegesRequired\": \"LOW\", \"userInteraction\": \"NONE\", \"scope\": \"UNCHANGED\", \"confidentialityImpact\": \"HIGH\", \"integrityImpact\": \"HIGH\", \"availabilityImpact\": \"HIGH\"}, \"exploitabilityScore\": 2.8, \"impactScore\": 5.9}, {\"source\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"type\": \"Secondary\", \"cvssData\": {\"version\": \"3.1\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\", \"baseScore\": 8.8, \"baseSeverity\": \"HIGH\", \"attackVector\": \"NETWORK\", \"attackComplexity\": \"LOW\", \"privilegesRequired\": \"LOW\", \"userInteraction\": \"NONE\", \"scope\": \"UNCHANGED\", \"confidentialityImpact\": \"HIGH\", \"integrityImpact\": \"HIGH\", \"availabilityImpact\": \"HIGH\"}, \"exploitabilityScore\": 2.8, \"impactScore\": 5.9}]}",
      "published": "2023-05-08T09:15:09.280",
      "references": "[{\"url\": \"https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9\", \"source\": \"security@apache.org\", \"tags\": [\"Exploit\", \"Mailing List\", \"Vendor Advisory\"]}, {\"url\": \"https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\", \"tags\": [\"Exploit\", \"Mailing List\", \"Vendor Advisory\"]}]",
      "sourceIdentifier": "security@apache.org",
      "vulnStatus": "Modified",
      "weaknesses": "[{\"source\": \"security@apache.org\", \"type\": \"Primary\", \"description\": [{\"lang\": \"en\", \"value\": \"CWE-89\"}]}]"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-31038\",\"sourceIdentifier\":\"security@apache.org\",\"published\":\"2023-05-08T09:15:09.280\",\"lastModified\":\"2024-11-21T08:01:17.933\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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)\\n\\n\\n\\n\\nNote that Log4cxx is a C++ framework, so only C++ applications are affected.\\n\\nBefore 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.\\n\\n\\n\\n\\nThree preconditions must be met for this vulnerability to be possible:\\n\\n1. Log4cxx compiled with ODBC support(before version 1.1.0, this was auto-detected at compile time)\\n\\n2. ODBCAppender enabled for logging messages to, generally done via a config file\\n\\n3. User input is logged at some point. If your application does not have user input, it is unlikely to be affected.\\n\\n\\n\\n\\n\\nUsers 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. \\nNote 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.\\n\\n\\n\\n\\n\\nExample of old configuration snippet:\\n\\n\u003cappender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u003e\\n\\n\u00a0\u00a0\u00a0 \u003cparam name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (\u0027%m\u0027)\\\" /\u003e\\n\\n\u00a0\u00a0\u00a0 ... other params here ...\\n\\n\u003c/appender\u003e\\n\\n\\n\\n\\nThe migrated configuration snippet with new ColumnMapping parameters:\\n\\n\\n\u003cappender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u003e\\n\\n\\n\\n\\n\u00a0 \u00a0 \u003cparam name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (?)\\\" /\u003e\\n\\n\u00a0\u00a0\u00a0 \u003cparam name=\\\"ColumnMapping\\\" value=\\\"message\\\"/\u003e\\n\u00a0\u00a0\u00a0 ... other params here ...\\n\\n\\n\u003c/appender\u003e\\n\\n\\n\\n\\n\\n\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":8.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":2.8,\"impactScore\":5.9},{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":8.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":2.8,\"impactScore\":5.9}]},\"weaknesses\":[{\"source\":\"security@apache.org\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-89\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:apache:log4cxx:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"0.9.0\",\"versionEndExcluding\":\"1.1.0\",\"matchCriteriaId\":\"DBA497A9-918F-4F82-8DD5-3627C6289513\"}]}]}],\"references\":[{\"url\":\"https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9\",\"source\":\"security@apache.org\",\"tags\":[\"Exploit\",\"Mailing List\",\"Vendor Advisory\"]},{\"url\":\"https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Exploit\",\"Mailing List\",\"Vendor Advisory\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9\", \"tags\": [\"vendor-advisory\", \"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T14:45:25.149Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 8.8, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"HIGH\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2023-31038\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-10-15T18:22:48.423396Z\"}}}], \"affected\": [{\"cpes\": [\"cpe:2.3:a:apache:log4cxx:*:*:*:*:*:*:*:*\"], \"vendor\": \"apache\", \"product\": \"log4cxx\", \"versions\": [{\"status\": \"affected\", \"version\": \"0.9.0\", \"lessThan\": \"1.1.0\", \"versionType\": \"custom\"}], \"defaultStatus\": \"unknown\"}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-10-15T18:24:03.443Z\"}}], \"cna\": {\"title\": \"Apache Log4cxx: SQL injection when using ODBC appender\", \"source\": {\"discovery\": \"INTERNAL\"}, \"metrics\": [{\"other\": {\"type\": \"Textual description of severity\", \"content\": {\"text\": \"6.8\"}}}], \"affected\": [{\"vendor\": \"Apache Software Foundation\", \"product\": \"Apache Log4cxx\", \"versions\": [{\"status\": \"affected\", \"version\": \"0.9.0\", \"lessThan\": \"1.1.0\", \"versionType\": \"semver\"}], \"defaultStatus\": \"unaffected\"}], \"references\": [{\"url\": \"https://lists.apache.org/thread/vgjlpdf353vv91gryspwxrzj6p0fbjd9\", \"tags\": [\"vendor-advisory\"]}], \"x_generator\": {\"engine\": \"Vulnogram 0.1.0-dev\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"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)\\n\\n\\n\\n\\nNote that Log4cxx is a C++ framework, so only C++ applications are affected.\\n\\nBefore 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.\\n\\n\\n\\n\\nThree preconditions must be met for this vulnerability to be possible:\\n\\n1. Log4cxx compiled with ODBC support(before version 1.1.0, this was auto-detected at compile time)\\n\\n2. ODBCAppender enabled for logging messages to, generally done via a config file\\n\\n3. User input is logged at some point. If your application does not have user input, it is unlikely to be affected.\\n\\n\\n\\n\\n\\nUsers 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. \\nNote 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.\\n\\n\\n\\n\\n\\nExample of old configuration snippet:\\n\\n\u003cappender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u003e\\n\\n\\u00a0\\u00a0\\u00a0 \u003cparam name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (\u0027%m\u0027)\\\" /\u003e\\n\\n\\u00a0\\u00a0\\u00a0 ... other params here ...\\n\\n\u003c/appender\u003e\\n\\n\\n\\n\\nThe migrated configuration snippet with new ColumnMapping parameters:\\n\\n\\n\u003cappender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u003e\\n\\n\\n\\n\\n\\u00a0 \\u00a0 \u003cparam name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (?)\\\" /\u003e\\n\\n\\u00a0\\u00a0\\u00a0 \u003cparam name=\\\"ColumnMapping\\\" value=\\\"message\\\"/\u003e\\n\\u00a0\\u00a0\\u00a0 ... other params here ...\\n\\n\\n\u003c/appender\u003e\\n\\n\\n\\n\\n\\n\", \"supportingMedia\": [{\"type\": \"text/html\", \"value\": \"\u003cdiv\u003eSQL injection in Log4cxx when using the ODBC appender to send log messages to a database.\u0026nbsp; No fields sent to the database were properly escaped for SQL injection.\u0026nbsp; This has been the case since at least version 0.9.0(released 2003-08-06)\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eNote that Log4cxx is a C++ framework, so only C++ applications are affected.\u003c/div\u003e\u003cdiv\u003eBefore version 1.1.0, the ODBC appender was automatically part of Log4cxx if the library was found when compiling the library.\u0026nbsp; As of version 1.1.0, this must be both explicitly enabled in order to be compiled in.\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eThree preconditions must be met for this vulnerability to be possible:\u003c/div\u003e\u003cdiv\u003e1. Log4cxx compiled with ODBC support(before version 1.1.0, this was auto-detected at compile time)\u003c/div\u003e\u003cdiv\u003e2. ODBCAppender enabled for logging messages to, generally done via a config file\u003c/div\u003e\u003cdiv\u003e3. User input is logged at some point. If your application does not have user input, it is unlikely to be affected.\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eUsers 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. \u003cbr\u003eNote that this fix does require a configuration file update, as the old configuration files will not configure properly.\u0026nbsp; An example is shown below, and more information may be found in the Log4cxx documentation on the ODBCAppender.\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eExample of old configuration snippet:\u003c/div\u003e\u003cdiv\u003e\u0026lt;appender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \u0026lt;param name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (\u0027%m\u0027)\\\" /\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; ... other params here ...\u003c/div\u003e\u003cdiv\u003e\u0026lt;/appender\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eThe migrated configuration snippet with new ColumnMapping parameters:\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u0026lt;appender name=\\\"SqlODBCAppender\\\" class=\\\"ODBCAppender\\\"\u0026gt;\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u003cdiv\u003e\u003c/div\u003e\u003cdiv\u003e\u0026nbsp; \u0026nbsp; \u0026lt;param name=\\\"sql\\\" value=\\\"INSERT INTO logs (message) VALUES (?)\\\" /\u0026gt;\u003c/div\u003e\u003cdiv\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \u0026lt;param name=\\\"ColumnMapping\\\" value=\\\"message\\\"/\u0026gt;\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; ... other params here ...\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003e\u0026lt;/appender\u0026gt;\u003cbr\u003e\u003c/div\u003e\u003cbr\u003e\u003c/div\u003e\", \"base64\": false}]}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-89\", \"description\": \"CWE-89 Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)\"}]}], \"configurations\": [{\"lang\": \"en\", \"value\": \"Log4cxx must be built with ODBC support, and configured to log messages to a database for this to occur\\n\", \"supportingMedia\": [{\"type\": \"text/html\", \"value\": \"Log4cxx must be built with ODBC support, and configured to log messages to a database for this to occur\u003cbr\u003e\", \"base64\": false}]}], \"providerMetadata\": {\"orgId\": \"f0158376-9dc2-43b6-827c-5f631a4d8d09\", \"shortName\": \"apache\", \"dateUpdated\": \"2023-05-08T08:54:10.234Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2023-31038\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-10-15T18:24:15.291Z\", \"dateReserved\": \"2023-04-22T18:15:20.678Z\", \"assignerOrgId\": \"f0158376-9dc2-43b6-827c-5f631a4d8d09\", \"datePublished\": \"2023-05-08T08:54:10.234Z\", \"assignerShortName\": \"apache\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

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.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…