# CVE-2021-41766: Insecure Java Deserialization in Apache Karaf

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.1
- **CVSS:** 8.1 (v3.1, NVD) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 2.10% (percentile 82, 2026-11-26)
- **CWE:** CWE-502
- **Aliases:** GHSA-jh5g-9m4v-9vv9
- **Published:** 2022-01-26T11:10:11.000Z
- **Modified:** 2026-06-17T04:08:53.120Z

## Who should check

- Projects that depend on Maven package org.apache.karaf.management:org.apache.karaf.management.server (\< 4.3.6)
- Anyone running Apache Software Foundation Apache Karaf \>= Apache Karaf, \< 4.3.6

## 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 and fixed versions

- Maven `org.apache.karaf.management:org.apache.karaf.management.server`: affected \< 4.3.6; fixed 4.3.6 (osv)
- Apache Software Foundation Apache Karaf: \>= Apache Karaf, \< 4.3.6 (cvelist)

## Mitigation

- Upgrade org.apache.karaf.management:org.apache.karaf.management.server to 4.3.6 or later.
- Vendor workaround: Apache Karaf users should upgrade to 4.3.6 or later as soon as possible, or disable remote access to JMX server.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-41766. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-41766.md
Affected: org.apache.karaf.management:org.apache.karaf.management.server < 4.3.6
Fixed in: 4.3.6

Steps:
1. Search this machine and project for org.apache.karaf.management:org.apache.karaf.management.server (Maven), Apache Software Foundation Apache Karaf: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-41766 being exploited?

There is no confirmed exploitation: CVE-2021-41766 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.10% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-41766?

High: CVSS 8.1 (v3.1, scored by NVD). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2021-41766?

org.apache.karaf.management:org.apache.karaf.management.server \< 4.3.6.

### Is there a fix for CVE-2021-41766?

Yes. Fixed in 4.3.6. Upgrade org.apache.karaf.management:org.apache.karaf.management.server to 4.3.6 or later. Vendor workaround: Apache Karaf users should upgrade to 4.3.6 or later as soon as possible, or disable remote access to JMX server.

### How do I check if I'm affected by CVE-2021-41766?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://karaf.apache.org/security/cve-2021-41766.txt>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-41766>
- patch: <https://github.com/apache/karaf/pull/1475>
- patch: <https://github.com/apache/karaf/commit/b42c82ca3b9a22bd92d249a1060a1953f4188bc2>
- other: <https://gitbox.apache.org/repos/asf?p=karaf.git;h=93a019c>
- other: <https://gitbox.apache.org/repos/asf?p=karaf.git;h=b42c82c>
- other: <https://github.com/apache/karaf>
- other: <https://issues.apache.org/jira/browse/KARAF-7312>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-41766>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-jh5g-9m4v-9vv9> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-41766> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-41766>
