Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
gagliardetto binary
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Binary是gagliardetto个人开发者的一个库。用于 Borsh 和其他格式的编码/解码。 Binary 0.7.1之前版本存在安全漏洞。攻击者利用该漏洞在内存中分配具有(任意)过大大小值的切片,导致耗尽可用内存或使整个程序崩溃。

CVSS 8.8 · High EPSS 1.18% · P68
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2022-36078

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Slice Memory Allocation with Excessive Size Value in binary
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
未经控制的内存分配
Source: CVE Program / CVE List V5
Vulnerability Title
Binary 资源管理错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Binary是gagliardetto个人开发者的一个库。用于 Borsh 和其他格式的编码/解码。 Binary 0.7.1之前版本存在安全漏洞。攻击者利用该漏洞在内存中分配具有(任意)过大大小值的切片,导致耗尽可用内存或使整个程序崩溃。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
gagliardetto binary < 0.7.1 -

II. Public POCs for CVE-2022-36078

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-36078

请登录查看更多情报信息。

Patches & Fixes for CVE-2022-36078 (1)

Vendor Advisories for CVE-2022-36078 (1)

Other References for CVE-2022-36078 (1)

IV. Related Vulnerabilities