CVE-2026-103636

Apache DataSketches: datasketches-cpp: Out-of-bounds read in VarOpt union deserialization allows denial of service via a truncated sketch

Published Oct 10, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
Out-of-bounds read in the VarOpt union deserialization of Apache DataSketches C++ (repo: datasketches-cpp).

var_opt_union::deserialize() read the 32-byte preamble of a non-empty union after checking that only 8 bytes were available, so a truncated serialized union could cause a read of up to 24 bytes past the end of the input. For such inputs, the size remaining for the embedded sketch was also computed by an unsigned subtraction that could wrap around, so the embedded sketch's own size checks no longer limited reads to the input. The bytes read can become part of the deserialized union's state. This can cause a crash (denial of service) and could expose adjacent memory contents.

This issue affects Apache DataSketches C++: from 2.0.0-incubating before 5.3.0. Only applications that deserialize VarOpt unions from untrusted sources are affected.

Users are recommended to upgrade to version 5.3.0, which fixes this issue.

Analysis

AI-generated

Technical impact

A flaw in the VarOpt union deserialization routine of Apache DataSketches C++ reads beyond the end of a truncated input, allowing an attacker to trigger a crash and potentially expose adjacent memory. The bug involves an incorrect buffer size check and an unsigned subtraction that can wrap, both of which fall under CWE‑125 and CWE‑191.

Affected Systems

The vulnerability is present in Apache DataSketches C++ versions from 2.0.0‑incubating up to, but not including, 5.3.0. Applications that deserialize VarOpt unions from untrusted sources are affected and should upgrade to version 5.3.0 or later.

Risk and Exploitability

The vulnerability can be exploited by supplying a truncated or otherwise malformed VarOpt union to a process that performs unchecked deserialization. EPSS score of <1% suggests a low likelihood of exploitation, and the CVSS score of 7.5 indicates a high severity. The denial‑of‑service impact and potential memory disclosure are the primary concerns. The likely attack vector is any interface that accepts external data for VarOpt union deserialization, such as network input, files, or inter‑process communication.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Apache DataSketches C++ 5.3.0, which contains the fix for the out‑of‑bounds read and size‑check overflow.
  • Validate that any VarOpt union input claims to contain at least 32 bytes before invoking deserialize; reject or reject processing of inputs that do not meet this minimum.
  • If an upgrade is not immediately possible, avoid deserializing VarOpt unions from external or untrusted sources until a patch or workaround is applied.

Generated by OpenCVE AI on October 17, 2026 at 08:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Metrics cvssV3_1

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

Type Values Removed Values Added
First Time appeared Apache
Apache datasketches
Vendors & Products Apache
Apache datasketches
Type Values Removed Values Added
Description Out-of-bounds read in the VarOpt union deserialization of Apache DataSketches C++ (repo: datasketches-cpp). var_opt_union::deserialize() read the 32-byte preamble of a non-empty union after checking that only 8 bytes were available, so a truncated serialized union could cause a read of up to 24 bytes past the end of the input. For such inputs, the size remaining for the embedded sketch was also computed by an unsigned subtraction that could wrap around, so the embedded sketch's own size checks no longer limited reads to the input. The bytes read can become part of the deserialized union's state. This can cause a crash (denial of service) and could expose adjacent memory contents. This issue affects Apache DataSketches C++: from 2.0.0-incubating before 5.3.0. Only applications that deserialize VarOpt unions 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 in VarOpt union deserialization allows denial of service via a truncated sketch
Weaknesses CWE-125
CWE-191
References
Weaknesses
  • CWE-125

    Out-of-bounds Read

  • CWE-191

    Integer Underflow (Wrap or Wraparound)

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Oct 16, 2026, 3:32 PM
Reserved
Sep 30, 2026, 11:57 PM
Status
Undergoing Analysis
Published
Oct 10, 2026, 11:17 AM
Modified
Oct 16, 2026, 4:16 PM