CVE-2021-41766 is a high-severity (CVSS 8.1) Deserialization of Untrusted Data vulnerability in org.apache.karaf.management:org.apache.karaf.management.server. A fix is available for org.apache.karaf.management:org.apache.karaf.management.server — see the affected versions and patch details below.
Insecure Java Deserialization in Apache Karaf
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-41766 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.apache.karaf.management:org.apache.karaf.management.serverReal-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
Apache Karaf allows monitoring of applications and the Java runtime by using the Java Management Extensions (JMX). JMX is a Java RMI based technology that relies on Java serialized objects for client server communication. Whereas the default JMX implementation is hardened against unauthenticated deserialization attacks, the implementation used by Apache Karaf is not protected against this kind of attack. The impact of Java deserialization vulnerabilities strongly depends on the classes that are available within the targets class path. Generally speaking, deserialization of untrusted data does always represent a high security risk and should be prevented. The risk is low as, by default, Karaf uses a limited set of classes in the JMX server class path. It depends of system scoped classes (e.g. jar in the lib folder).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.karaf.management:org.apache.karaf.management.server | all versions | 4.3.6org.apache.karaf.management:org.apache.karaf.management.server:4.3.6 |
Affected Products
karafapacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.karaf.management:org.apache.karaf.management.server, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.karaf.management:org.apache.karaf.management.server to 4.3.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-41766 is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
The default JMX implementation is hardened against unauthenticated deserialization attacks. The implementation used by Apache Karaf is not protected against this kind of attack. The impact of Java deserialization vulnerabilities strongly depends on the classes available within the target's classpath. Generally…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Fuse 7.11 | karaf | RHSA-2022:5532 |
Frequently Asked Questions
Is CVE-2021-41766 in your dependencies?
Find it across Maven, including transitive dependencies.