CVE & CISA-KEV Catalog

CVE-2022-36078

HIGH
8.8
CVSS v3
NVD

Description

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.

How to fix

Remediation Available
binaryNVD
Affected:< 0.7.1Fixed in:0.7.1CVE-2022-36078derived from NVD

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploit Intelligence

0.96%probability of exploitation in 30 days
58thpercentile

Moderate risk: more likely to be exploited than 58% of all known CVEs.

References

Exploit1
Third-Party Advisory1

Related Vulnerabilities

Other CWE-789 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2022-30522High7.590%-Fix
CVE-2026-49975High7.528%-Fix
CVE-2025-27533High7.58.6%-Fix
CVE-2017-7651High7.55.3%-Fix
CVE-2021-31811Medium5.53.4%--
CVE-2021-27906Medium5.53.3%-Fix

Common questions

How do I fix CVE-2022-36078?

Upgrade binary to 0.7.1 or later.

Is CVE-2022-36078 being actively exploited?

Not that we know of. CVE-2022-36078 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 0.96% is the estimated probability that it will be exploited in the next 30 days. That is higher than 58% of all scored CVEs.

How severe is CVE-2022-36078?

CVE-2022-36078 has a CVSS v3 base score of 8.8, rated high. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2022-36078 affect?

Published advisories record a fix for binary (NVD). Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2022-36078
CVE-2022-36078 severity badge

Markdown

[![CVE-2022-36078](https://tridentstack.com/cve/badge/CVE-2022-36078.svg)](https://tridentstack.com/cve/CVE-2022-36078)

HTML

<a href="https://tridentstack.com/cve/CVE-2022-36078"><img src="https://tridentstack.com/cve/badge/CVE-2022-36078.svg" alt="CVE-2022-36078"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

See how it worksStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-11-21.