Read the docs
TI-2022-16501 Aliases CVE-2022-36078GHSA-4p6f-m4f9-ch88

Slice Memory Allocation with Excessive Size Value in binary

Priority HIGH 73CWE-789Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-789.

Summary

Binary provides encoding/decoding in Borsh and other formats. The vulnerability is a memory allocation vulnerability that can be exploited to allocate slices in memory with (arbitrary) excessive size value, which can either exhaust available memory or crash the whole program. When using `github.com/gagliardetto/binary` to parse unchecked (or wrong type of) data from untrusted sources of input (e.g. the blockchain) into slices, it's possible to allocate memory with excessive size. When `dec.Decode(&val)` method is used to parse data into a structure that is or contains slices of values, the length of the slice was previously read directly from the data itself without any checks on the size of it, and then a slice was allocated. This could lead to an overflow and an allocation of memory with excessive size value. Users should upgrade to `v0.7.1` or higher. A workaround is not to rely on the `dec.Decode(&val)` function to parse the data, but to use a custom `UnmarshalWithDecoder()` method that reads and checks the length of any slice.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.01207 68th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed binary (gagliardetto): 0.7.1github.com/gagliardetto/binary (Go): 0.7.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
gagliardettobinarybefore 0.7.10.7.1Patch availableCNA
—github.com/gagliardetto/binary (Go)before 0.7.10.7.1Patch availableGHSA-4p6f-m4f9-ch88
  • binary Vendorgagliardetto Affected before 0.7.1 Fixed in 0.7.1 Patch available CNA
  • github.com/gagliardetto/binary (Go) Vendor— Affected before 0.7.1 Fixed in 0.7.1 Patch available GHSA-4p6f-m4f9-ch88

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:binary_project:binary:*:*:*:*:*:go:*:*before 0.7.1VulnerableBinary Project
  • cpe:2.3:a:binary_project:binary:*:*:*:*:*:go:*:* Versions before 0.7.1 Vulnerable ·Binary Project

Remediation

  • Fix · CNA binary (gagliardetto) Fixed in 0.7.1
  • Fix · GHSA-4p6f-m4f9-ch88 github.com/gagliardetto/binary (Go) Fixed in 0.7.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-36078
  2. 2026-10-03 Alias added: GHSA-4p6f-m4f9-ch88

References

Sources