Skip to main content

Apache DataSketches C++ EUVDEUVD-2026-96307

| CVE-2026-103513 CRITICAL
Out-of-bounds Write (CWE-787)
2026-10-10 apache GHSA-2w73-5h25-v3cg
9.8
CVSS 3.1 · Vendor: apache
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted CPC sketch to deserializer
  2. Exploit
    Decompressor reads past compressed-data end
  3. Execution
    Unvalidated row index writes out of bounds
  4. Impact
    Heap corruption crashes process or enables code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application calls cpc_sketch::deserialize() (from a byte buffer or stream) on CPC sketch data originating from an untrusted source - this is the explicit prerequisite stated in the advisory. The out-of-bounds WRITE additionally requires the sketch to use the 'hybrid' flavor, where decoded row indices were not validated; the out-of-bounds READ arises because the read position was only checked after decoding finished, and additional header fields and decoded values (including lg_k) were unvalidated. LIMITING FACTORS: applications that never deserialize CPC sketches, or only deserialize sketches from trusted/internal sources, are not affected regardless of CVSS score; the vulnerability lives in a C++ library, so reachability depends entirely on whether the embedding application exposes deserialization to attacker-controlled bytes. Fixed in 5.3.0.

Impact

Signals conflict and should be weighed carefully. The NVD CVSS of 9.8 (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H) paints a critical, remotely-exploitable picture, but Apache's own release notes classify this issue as 'moderate' - a notable severity disagreement that defenders should reconcile before treating it as a 9.8. EPSS is low (0.19%, 8th percentile), there is no CISA KEV listing, and no public exploit is referenced, so there is no evidence of active or imminent mass exploitation. Critically, the network attack vector is conditional: the advisory explicitly states that only applications which deserialize CPC sketches from UNTRUSTED sources are affected, so AV:N only holds where an application exposes cpc_sketch::deserialize() to attacker-controlled bytes (e.g., an RPC/API surface). The confirmed technical impact per the description is heap corruption leading to a crash (availability), with code execution described only as 'potentially enabling further exploitation' - so the I:H/C:H portions of the CVSS are plausible (CWE-787 out-of-bounds write) but not demonstrated. Net: this is a real hardening priority for the narrow set of services that ingest untrusted sketch images, but for most deployments it is a high-CVSS-but-conditional DoS risk rather than a widely-weaponizable RCE.

Exploit ScenarioDerived

An application or service that accepts serialized Apache DataSketches CPC sketches from external/untrusted input (e.g., a data-analytics API or message consumer) calls cpc_sketch::deserialize() on attacker-supplied bytes. The attacker submits a crafted CPC sketch (hybrid flavor for the write primitive) that causes the decompressor to read past the end of the compressed data and write outside an internal heap buffer, corrupting heap memory to crash the process and potentially enabling further exploitation. No public proof-of-concept is identified at time of analysis.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Oct 16, 2026

Out-of-bounds read and write in the CPC sketch deserialization path of Apache DataSketches C++ (datasketches-cpp) - specifically cpc_sketch::deserialize() called on a byte buffer or a stream - allows a crafted serialized sketch to corrupt heap memory: the decompressor reads past the end of the compressed data because the read position was only checked after decoding finished, and in the hybrid flavor it writes outside an internal heap buffer because decoded row indices were not validated, crashing the process with potential for further exploitation. All releases from 2.0.0-incubating before 5.3.0 are affected, and the CVSS 3.1 base score is 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), indicating remote, unauthenticated impact, but reachability is conditional: only applications that deserialize CPC sketches from untrusted sources are exposed, since the flaw lives in a C++ library whose attack surface depends on the embedding application. Exploitation signals are mixed and should be weighed carefully - EPSS is only 0.19% (8th percentile), there is no CISA KEV entry, and no public exploit identified at time of analysis.

Earlier versions of this analysis (1)
v1 Oct 10, 2026 - 11:21

Out-of-bounds read and write in Apache DataSketches C++ CPC sketch deserialization allow remote unauthenticated attackers to corrupt heap memory or crash applications that call cpc_sketch::deserialize() on crafted serialized sketches from untrusted sources. Affected versions are 2.0.0-incubating before 5.3.0; the vendor-recommended fix is 5.3.0. No public exploit was identified at time of analysis, and exploitation requires a non-default data flow in which the target application deserializes externally supplied CPC sketch images.

RemediationAI

Vendor-released patch: upgrade to Apache DataSketches C++ 5.3.0, which contains the deserialization hardening (pull requests #503, #536 and #538) that fixes this issue together with four related sketch-deserialization CVEs (HLL, Count-Min, compact Theta, VarOpt); see the advisory https://lists.apache.org/thread/s7wyoqyf120dl5ys8jtr26dskd6m485h and the release notes https://github.com/apache/datasketches-cpp/releases/tag/5.3.0. Because the flaw sits in a linked C++ library, every consuming service must be rebuilt and redeployed against 5.3.0 rather than relying on a package update alone. If upgrading cannot happen immediately, the decisive compensating control is to remove attacker control of the deserialization input: accept CPC sketch images only from authenticated internal producers, or verify a signature/HMAC over each image before calling cpc_sketch::deserialize() - the trade-off is that producers must change to sign images and unsigned legacy images stop being accepted. A weaker alternative is to reject or truncate any image whose declared size exceeds the maximum plausible serialized length for the configured lg_k before invoking deserialization, accepting that legitimate larger sketches will be refused if the cap is mis-tuned. Where deserialization of untrusted data cannot be avoided at all, run it inside a sandboxed, memory-capped, unprivileged worker so that heap corruption leads only to a worker crash - this adds latency and operational complexity and provides no in-process protection for applications that must parse the bytes directly.

Affected VersionsENISA

Apache DataSketches 2.0.0-incubating ≤5.2.0

Affected Packages

euvd apache_datasketches no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Apache DataSketches is a library of streaming approximate-analysis sketches, and its C++ implementation (datasketches-cpp, tracked under CPE cpe:2.3:a:apache_software_foundation:apache_datasketches:*:*:*:*:*:*:*:*) serializes sketch state into compact binary images exchanged between processes and language runtimes. The CPC (Compressed Probabilistic Counting) sketch estimates distinct counts and includes a hybrid flavor that combines a sparse coupon list with a packed hash table of row indices; its deserializer rebuilds the sketch from a compressed stream. The root-cause class here is CWE-787 (out-of-bounds write), paired with an out-of-bounds read: the decompressor verified the read position only after decoding completed, so truncated or maliciously sized input is read past the end of the compressed buffer, while in the hybrid flavor decoded row indices were written into an internal heap buffer without validation, and other header fields and decoded values such as lg_k were likewise checked insufficiently. The fixes shipped in 5.3.0 as part of a broader deserialization-hardening release (pull requests #503, #536 and #538) that also corrected four sibling CVEs in HLL, Count-Min, compact Theta and VarOpt sketch deserialization, which matters for defenders because upgrading for this CVE resolves the related deserialization flaws at the same time.

Know when Apache Datasketches gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (apache) PRIMARY 9.8 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 9.8 CRITICAL

Crafted input reliably triggers OOB read/write with no auth or interaction when the app exposes untrusted deserialization (AV:N/AC:L/PR:N/UI:N); confirmed crash gives A:H and the CWE-787 heap write supports C:H/I:H potential.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (apache).

CVSS VectorVendor: apache

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

1
CVSS changed
Oct 16, 2026 - 16:24 NVD
9.8 (CRITICAL)

DescriptionCVE.org

Out-of-bounds read and write in the CPC sketch deserialization of Apache DataSketches C++ (repo: datasketches-cpp).

A crafted serialized CPC sketch passed to cpc_sketch::deserialize(), from either a byte buffer or a stream, can cause the decompressor to read past the end of the compressed data, because the read position was only checked after decoding finished. In the hybrid flavor, it can also cause a write outside an internal heap buffer, because decoded row indices were not validated. Several other header fields and decoded values, including lg_k, were also not validated. This can corrupt heap memory, causing a crash and potentially enabling further exploitation.

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

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

Executive ViewAI

Why It Matters

Apache DataSketches C++ (datasketches-cpp) versions 2.0.0-incubating through releases prior to 5.3.0 contain a critical memory-corruption flaw in the CPC sketch deserialization path, meaning any application that parses sketches from untrusted sources can be crashed or have its heap memory corrupted by a remote, unauthenticated attacker, with high confidentiality, integrity and availability impact. Because this is an embedded library rather than a standalone product, leadership exposure is concentrated in whichever internal or customer-facing services accept CPC sketch payloads from external, partner, or cross-tenant sources - those services are the ones that could be disrupted or compromised.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: never deserialize CPC sketches from untrusted, anonymous, or cross-tenant sources - restrict ingestion to authenticated, trusted producers or signed payloads; enforce strict size and bounds validation in wrapper code before calling cpc_sketch::deserialize() (cap input length, reject mismatched compressed sizes, validate decoded row indices), since the flaw stems from validation occurring after decoding; run any process that must parse untrusted sketches in an isolated, memory-limited sandbox with least privilege and no access to sensitive data; expose sketch-ingesting endpoints only to known network peers and monitor for abnormal crashes or core dumps as an exploitation indicator; and adopt datasketches-cpp 5.3.0 or later, or a vendor-published fix, as soon as it becomes available.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Low
niche C++ approximate-analytics library, limited production deployment footprint
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy