CVE-2022-36078
HIGHDescription
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
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
Impact
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Exploit Intelligence
Moderate risk: more likely to be exploited than 58% of all known CVEs.
References
Related Vulnerabilities
Other CWE-789 vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2022-30522 | High | 7.5 | 90% | - | Fix |
| CVE-2026-49975 | High | 7.5 | 28% | - | Fix |
| CVE-2025-27533 | High | 7.5 | 8.6% | - | Fix |
| CVE-2017-7651 | High | 7.5 | 5.3% | - | Fix |
| CVE-2021-31811 | Medium | 5.5 | 3.4% | - | - |
| CVE-2021-27906 | Medium | 5.5 | 3.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
Markdown
[](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.
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.