Skip to content
Sign in
CVE-2022-360788.8HighCWE-789

CVE-2022-36078: Slice Memory Allocation with Excessive Size Value in binary

gagliardetto · binary

Affected: gagliardetto binary · Exploitation: possible (1 to 10%)

Not in CyberSIXT coverage yet: no article names this CVE. This page shows the public record.

1.2%probability of exploitation in the next 30 days
68th percentile
050100

Higher than 68% of scored CVEs

8.8HighCVSS 3.1
LowHigh

DescriptionCVE.org

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.

Affected products1

From the CVE record. A product or version that is not listed is unknown, not unaffected.

  • gagliardetto · binary< 0.7.1

On the Atlas

Every published CVE is on the CyberSIXT Atlas, grouped by weakness, vendor and month.

Open the Atlas
Exploitation
Possible (1 to 10%). EPSS between 1% and 10%.
CISA KEV
Not listed
Public check
No public nuclei template

CoverageNo articles yet

No CyberSIXT article names CVE-2022-36078 yet, so there is no coverage timeline, action brief or change log for it. Everything on this page comes from the public CVE record, CISA KEV, EPSS and the nuclei template index. Search the archive or see the CVEs in the news.

References

Updated AboutDevelopersSign in