{"id":"CVE-2026-103634","kind":"vulnerability","aliases":["CVE-2026-103634"],"related":[],"title":"Apache DataSketches C++: crafted Count-Min sketch corrupts heap memory","description":"Out-of-bounds read and write in the Count-Min sketch deserialization of Apache DataSketches C++ (repo: datasketches-cpp).\n\ncount_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.\n\nThis 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.\n\nUsers are recommended to upgrade to version 5.3.0, which fixes this issue.","summary":"Apache DataSketches C++ mishandles Count-Min sketch deserialization: a truncated or crafted sketch can read past the input buffer and, through a 32-bit size overflow, leave an empty table that later updates and queries read and write outside. An attacker who supplies a crafted sketch can crash the process and may be able to corrupt heap memory further.","severity":"unknown","cvss":null,"epss":0.00198,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["c++","data-pipelines","datasketches","package"],"not_affected_if":["no-count-min-deserialization","trusted-input-only","version-5.3.0-or-later"],"how_to_check":"- Check the datasketches-cpp version in use; affected range is from `4.1.0` before `5.3.0`\n- Search the codebase for calls to `count_min_sketch::deserialize()` and confirm whether the input can come from untrusted sources","fix":"- Upgrade Apache DataSketches C++ to `5.3.0` or later","status":"open","published_at":"2026-10-22T07:16:40+00:00","first_seen_at":"2026-10-23T21:57:30+00:00","triaged_at":"2026-10-25T05:00:32+00:00","updated_at":"2026-10-25T05:00:32+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-25T05:00:32Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Apache DataSketches C++ to `5.3.0` or later","reach":"unknown","title":"Apache DataSketches C++: crafted Count-Min sketch corrupts heap memory","impact":"high","summary":"Apache DataSketches C++ mishandles Count-Min sketch deserialization: a truncated or crafted sketch can read past the input buffer and, through a 32-bit size overflow, leave an empty table that later updates and queries read and write outside. An attacker who supplies a crafted sketch can crash the process and may be able to corrupt heap memory further.","category":"package","nicknames":[],"who_cares":["c++","datasketches","data-pipelines"],"confidence":0.6,"needs_auth":"unknown","worst_case":"heap memory corrupted, process crashes, possible further exploitation","analyst_note":"","how_to_check":"- Check the datasketches-cpp version in use; affected range is from `4.1.0` before `5.3.0`\n- Search the codebase for calls to `count_min_sketch::deserialize()` and confirm whether the input can come from untrusted sources","needs_analyst":false,"not_affected_if":["trusted-input-only","no-count-min-deserialization","version-5.3.0-or-later"],"who_is_affected":"Only applications that deserialize Count-Min sketches from untrusted sources are affected. Services that only load sketches they produced themselves, or that never call Count-Min deserialization, are not exposed.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.00063,"input_tokens":3583,"output_tokens":543,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-103634':14A,17A '-2026':13A,16A '16':130C '32':47B,157C '4.1.0':211C '5.3.0':213C,234C 'abl':78B 'addit':139C 'affect':206C,226C 'alloc':190C 'apach':1A,24B,98C,207C 'applic':215C 'arithmet':159C 'attack':65B 'bit':48B,158C 'bound':86C 'bucket':150C 'buffer':43B 'byte':131C 'c':3A,18B,26B,100C,209C 'caus':124C,196C 'check':118C 'comput':144C 'corrupt':9A,80B,193C 'could':123C,163C 'count':6A,29B,93C,105C,219C 'count-min':5A,28B,92C,218C 'cpp':104C 'craft':4A,36B,69B,161C 'crash':72B,198C 'cve':12A,15A 'data':20B 'data-pipelin':19B 'datasketch':2A,22B,25B,99C,103C,208C 'datasketches-cpp':102C 'deseri':32B,96C,108C,173C,217C 'empti':53B,176C 'enabl':201C 'end':134C 'estim':182C 'exploit':203C 'fix':236C 'function':155C 'hash':154C 'heap':10A,81B,189C,194C 'includ':111C 'input':42B,116C,137C 'issu':205C,238C 'later':56B,179C 'leav':51B 'make':164C 'may':76B 'memori':11A,82B,195C 'min':7A,30B,94C,106C,220C 'mishandl':27B 'number':148C,152C 'out-of-bound':83C 'outsid':63B,187C 'overflow':50B 'packag':23B 'past':40B,132C 'pipelin':21B 'potenti':200C 'preambl':113C 'process':74B 'queri':59B,183C 'read':39B,60B,87C,126C,184C 'recommend':229C 'repo':101C 'serial':147C 'size':49B,117C,142C 'sketch':8A,31B,37B,70B,95C,107C,122C,162C,172C,221C 'sourc':224C 'suppli':67B 'tabl':54B,141C,177C 'truncat':34B,121C 'untrust':223C 'updat':57B,180C 'upgrad':231C 'user':227C 'version':233C 'wrap':166C 'write':62B,89C 'wrote':186C 'zero':168C","nicknames":[],"mitigations":[],"who_affected":"Only applications that deserialize Count-Min sketches from untrusted sources are affected. Services that only load sketches they produced themselves, or that never call Count-Min deserialization, are not exposed.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-22T07:16:40+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-103634","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-103634","severity":null,"published_at":"2026-10-22T07:16:40+00:00","modified_at":"2026-10-22T16:56:52+00:00","first_seen_at":"2026-10-23T21:57:30+00:00","fetched_at":"2026-10-23T22:29:02+00:00","note":null},{"source":"epss","external_id":"CVE-2026-103634","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-103634","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-24T07:15:52+00:00","fetched_at":"2026-10-24T07:15:52+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}