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.
Published: 2026-10-22
Score: n/a
EPSS: n/a
KEV: No
Impact: Memory corruption via out-of-bounds read/write
Action: Immediate Patch
AI Analysis

Impact

The vulnerability stems from an out-of-bounds read and write in the Count‑Min sketch deserialization routine in Apache DataSketches C++. A truncated sketch skips the preamble size check, permitting a read up to 16 bytes past the input boundary. Additionally, the sketch’s table size calculation uses 32‑bit arithmetic, allowing an attacker to craft a sketch that causes the table size to wrap to zero. When the sketch is later updated or queried, the application reads and writes beyond the allocated heap, potentially corrupting memory, crashing the process, and opening the door for remote exploitation. This flaw is an instance of Integer Overflow or Wraparound (CWE‑190) and Out‑of‑Bounds Write (CWE‑787).

Affected Systems

Apache DataSketches C++ is affected in all releases from 4.1.0 up through, but not including, 5.3.0. Only applications that deserialize Count‑Min sketches originating from untrusted or partially controlled sources are at risk. The vulnerability does not affect other DataSketches components or earlier versions that do not include the deserialization code.

Risk and Exploitability

The flaw allows arbitrary memory corruption, which, in a suitable environment, could lead to arbitrary code execution or denial of service. Although no EPSS score is available, the severity is likely high due to the nature of the heap corruption. The vulnerability is not listed in the CISA KEV catalog, but the potential impact and the absence of mitigations in affected versions mean that exploitation is feasible for an attacker able to supply a crafted sketch. No particular prerequisites beyond the ability to provide deserialized data are required; thus the risk applies to any deployment that accepts sketch data from external input.

Generated by OpenCVE AI on October 22, 2026 at 08:40 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Apache DataSketches C++ 5.3.0 or later
  • Restrict the use of Count‑Min sketch deserialization to data from trusted or authenticated sources
  • Implement input validation or sandboxing for sketch inputs to prevent malformed data from reaching the deserialization routine

Generated by OpenCVE AI on October 22, 2026 at 08:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 22 Oct 2026 09:30:00 +0000

Type Values Removed Values Added
References

Thu, 22 Oct 2026 07:00:00 +0000

Type Values Removed Values Added
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.
Title Apache DataSketches: datasketches-cpp: Out-of-bounds read and write in Count-Min sketch deserialization allows memory corruption via a crafted sketch
Weaknesses CWE-190
CWE-787
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-10-22T07:16:57.732Z

Reserved: 2026-09-30T23:36:49.873Z

Link: CVE-2026-103634

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-22T07:16:40.783

Modified: 2026-10-22T09:17:12.503

Link: CVE-2026-103634

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T08:45:02Z

Weaknesses