CVE-2026-55246

bincookie: Heap buffer overflow via unvalidated `num_pages` when parsing a `.binarycookies` file

Published Oct 15, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
bincookie is a header-only binarycookies parser. Prior to 0.1.9, bincookie_init_file() in bincookie.h allocates a buffer using the actual .binarycookies file length but trusts the file-controlled num_pages field as the loop bound for byte-swapping page_sizes entries. A crafted file can make the loop read and write beyond the heap allocation, and related unvalidated page sizes and cookie_offsets can drive additional out-of-bounds accesses in page and cookie iteration. Applications that parse an attacker-supplied binarycookies file may crash or suffer heap corruption that can potentially enable code execution. This issue is fixed in version 0.1.9.

Analysis

AI-generated

Technical impact

bincookie is a header‑only parser for .binarycookies files. In versions prior to 0.1.9 the function bincookie_init_file allocates a buffer sized to the file length but then trusts the file‑controlled num_pages field as the bound for a loop that byte‑swaps page size entries. A crafted file can cause this loop to read and write beyond the allocated heap buffer, resulting in a heap overflow. The overflow can corrupt adjacent heap data and, because unvalidated page_sizes and cookie_offsets drive later iterations, can lead to additional out‑of‑bounds accesses. The vulnerability is identified as CWE‑122 and CWE‑787 and can crash an application or, if exploited correctly, enable arbitrary code execution.

Affected Systems

The vulnerability affects the Tatsh bincookie library in any application that parses .binarycookies files using bincookie before version 0.1.9. The security advisory and release notes indicate that updating to bincookie v0.1.9 or newer incorporates the fix that removes the unsafe use of num_pages as a loop bound.

Risk and Exploitability

The CVSS score of 7.8 reflects a high impact severity, and the EPSS score is reported as less than 1 percent, indicating that known exploitation attempts are very rare at present. The vulnerability is not listed in the CISA KEV catalog. Attackers must supply a malicious .binarycookies file to a parsing application; thus the attack vector is local file injection or supply. Because the flaw resides in application code rather than a network service, exploitation is limited to scenarios where the attacker can place a crafted file where the application will read it.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade bincookie to version 0.1.9 or newer to apply the fixed parser logic.
  • Rebuild and redeploy your application to link against the updated bincookie library, ensuring the patch is active.
  • Monitor application logs for parsing crashes or abnormal heap usage that could indicate an attempted exploitation.

Generated by OpenCVE AI on October 16, 2026 at 21:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Tatsh
Tatsh bincookie
Vendors & Products Tatsh
Tatsh bincookie
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description bincookie is a header-only binarycookies parser. Prior to 0.1.9, bincookie_init_file() in bincookie.h allocates a buffer using the actual .binarycookies file length but trusts the file-controlled num_pages field as the loop bound for byte-swapping page_sizes entries. A crafted file can make the loop read and write beyond the heap allocation, and related unvalidated page sizes and cookie_offsets can drive additional out-of-bounds accesses in page and cookie iteration. Applications that parse an attacker-supplied binarycookies file may crash or suffer heap corruption that can potentially enable code execution. This issue is fixed in version 0.1.9.
Title bincookie: Heap buffer overflow via unvalidated `num_pages` when parsing a `.binarycookies` file
Weaknesses CWE-122
CWE-787
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 15, 2026, 6:27 PM
Reserved
Jun 16, 2026, 4:44 PM
Status
Deferred
Published
Oct 15, 2026, 6:17 PM
Modified
Oct 16, 2026, 8:04 PM