Tatsh bincookie
bincookie: Heap buffer overflow via unvalidated `num_pages` when parsing a `.binarycookies` file
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.1.9
Fixed in 0.1.9
Mitigation
Upgrade bincookie to 0.1.9 or later.
References
- Vendor advisory github.com/Tatsh/bincookie/security/advisories…
- Patch github.com/Tatsh/bincookie/commit/bc1433c1ee4d…
- Release notes github.com/Tatsh/bincookie/releases/tag/v0.1.9
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.