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: 5.3 Medium
EPSS: < 1% Very Low
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. The CVSS score is 5.3, indicating moderate severity. The EPSS score of 0.00238 indicates a very low but non‑zero probability that the vulnerability will be exploited in the near future. 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 26, 2026 at 15:55 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 26, 2026 at 15:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


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

Type Values Removed Values Added
First Time appeared Apache
Apache datasketches
Vendors & Products Apache
Apache datasketches

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

Apache Datasketches
cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-10-26T13:43:13.987Z

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

Link: CVE-2026-103634

cve-icon Vulnrichment

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

cve-icon NVD

Status : Awaiting Analysis

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

Modified: 2026-10-26T14:16:23.527

Link: CVE-2026-103634

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T16:00:18Z

Weaknesses