2023-05-16 16:11:43 +02:00

79 lines
3.8 KiB
JSON

{
"id": "CVE-2023-31038",
"sourceIdentifier": "security@apache.org",
"published": "2023-05-08T09:15:09.280",
"lastModified": "2023-05-15T16:10:47.323",
"vulnStatus": "Analyzed",
"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<appender name=\"SqlODBCAppender\" class=\"ODBCAppender\">\n\n\u00a0\u00a0\u00a0 <param name=\"sql\" value=\"INSERT INTO logs (message) VALUES ('%m')\" />\n\n\u00a0\u00a0\u00a0 ... other params here ...\n\n</appender>\n\n\n\n\nThe migrated configuration snippet with new ColumnMapping parameters:\n\n\n<appender name=\"SqlODBCAppender\" class=\"ODBCAppender\">\n\n\n\n\n\u00a0 \u00a0 <param name=\"sql\" value=\"INSERT INTO logs (message) VALUES (?)\" />\n\n\u00a0\u00a0\u00a0 <param name=\"ColumnMapping\" value=\"message\"/>\n\u00a0\u00a0\u00a0 ... other params here ...\n\n\n</appender>\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",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH",
"baseScore": 8.8,
"baseSeverity": "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"
]
}
]
}