CVE-2026-103513: Apache DataSketches: datasketches-cpp: Out-of-bounds read and write in the CPC sketch deserialization allows memory corruption via a crafted sketch

Published Oct 10, 2026
·
Updated

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 cpcsketch::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 lgk, 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.

Affected Software

1 affected component
Apache DataSketches C++>=2.0.0-incubating<5.3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Apache DataSketches C++ (datasketches-cpp) to a version that resolves this vulnerability.

    Fixed in 5.3.0

Event History

Oct 10, 2026
CVE Published
via MITRE·10:23 AM
Data Sourced
via MITRE·10:23 AM
DescriptionWeakness
Data Sourced
via NVD·11:17 AM
DescriptionWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Only applications using affected Apache DataSketches C++ versions that deserialize CPC sketches from untrusted sources are affected. The affected version range is from 2.0.0-incubating before 5.3.0.

2

What must an attacker provide to trigger the vulnerability?

An attacker needs to supply a crafted serialized CPC sketch that the application passes to cpc_sketch::deserialize(), either from a byte buffer or a stream. The malformed sketch can drive out-of-bounds reads and, in the hybrid flavor, writes outside an internal heap buffer.

3

What is the recommended remediation?

Upgrade Apache DataSketches C++ to version 5.3.0. This release fixes the missing validation of compressed-data bounds, row indices, header fields, and decoded values including lg_k.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203