Skip to content
Heist/ feed
Back to feed
Unrated

Apache DataSketches: datasketches-cpp: Out-of-bounds read and write in Count-Min sketch deserialization allows memory corruption via a crafted sketch

Type: advisorySources: Official CVE List

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.

Products
Apache DataSketches
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-103634
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 08:57 UTC · Revision 2

Source evidence

Apache DataSketches: datasketches-cpp: Out-of-bounds read and write in Count-Min sketch deserialization allows memory corruption via a crafted sketch

core-cve · Original source

Published 22 Oct 2026, 06:42 UTC

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.

cve:CVE-2026-103634

Apache DataSketches

Fixed versions: Not specified

Complete source record
{
  "id": "df07a09cdd642c27cd9986bc4d8ee8268f004a476b3140661263e8d23b9d2c39",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-103634",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Apache DataSketches: datasketches-cpp: Out-of-bounds read and write in Count-Min sketch deserialization allows memory corruption via a crafted sketch",
    "summary": "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.",
    "evidence": "cve:CVE-2026-103634",
    "products": [
      {
        "name": {
          "value": "Apache DataSketches",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-103634",
      "aliases": [
        "CVE-2026-103634"
      ],
      "metrics": [
        {
          "other": {
            "type": "Textual description of severity",
            "content": {
              "text": "moderate"
            }
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "Apache Software Foundation",
          "product": "Apache DataSketches",
          "versions": [
            {
              "status": "affected",
              "version": "4.1.0",
              "versionType": "semver",
              "lessThanOrEqual": "5.2.0"
            }
          ],
          "packageURL": "pkg:github/apache/datasketches-cpp",
          "packageName": "apache/datasketches-cpp",
          "collectionURL": "https://github.com",
          "defaultStatus": "unaffected"
        }
      ],
      "modified": "2026-10-26T13:43:13.987Z",
      "provider": "cve",
      "references": [
        "https://lists.apache.org/thread/rkx9oh06g5cjc6vmmpqloxwfz0gzz01h",
        "https://github.com/apache/datasketches-cpp/releases/tag/5.3.0"
      ],
      "provider_metadata": {
        "adp": [
          {
            "title": "CVE Program Container",
            "references": [
              {
                "url": "http://www.openwall.com/lists/oss-security/2026/10/10/4"
              }
            ],
            "providerMetadata": {
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE",
              "dateUpdated": "2026-10-22T07:16:57.732Z"
            }
          },
          {
            "title": "CISA ADP Vulnrichment",
            "metrics": [
              {
                "cvssV3_1": {
                  "scope": "UNCHANGED",
                  "version": "3.1",
                  "baseScore": 5.3,
                  "attackVector": "NETWORK",
                  "baseSeverity": "MEDIUM",
                  "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
                  "integrityImpact": "NONE",
                  "userInteraction": "NONE",
                  "attackComplexity": "LOW",
                  "availabilityImpact": "LOW",
                  "privilegesRequired": "NONE",
                  "confidentialityImpact": "NONE"
                }
              },
              {
                "other": {
                  "type": "ssvc",
                  "content": {
                    "id": "CVE-2026-103634",
                    "role": "CISA Coordinator",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "yes"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "version": "2.0.3",
                    "timestamp": "2026-10-26T13:43:10.294464Z"
                  }
                }
              }
            ],
            "providerMetadata": {
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP",
              "dateUpdated": "2026-10-26T13:43:13.987Z"
            }
          }
        ],
        "cna": {
          "orgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
          "shortName": "apache",
          "dateUpdated": "2026-10-22T06:42:20.454Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-103634",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-cve",
  "document_id": 307230,
  "published_at": "2026-10-22T06:42:20.454+00:00"
}