GHSA-fjx5-qpf4-xjf2 – borsh
Package
Manager: cargo
Name: borsh
Vulnerable Version: >=0 <1.0.0-alpha.1
Severity
Level: Medium
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P/RL:U/RC:R
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
EPSS: N/A pctlN/A
Details
Parsing borsh messages with ZST which are not-copy/clone is unsound Affected versions of borsh cause undefined behavior when zero-sized-types (ZST) are parsed and the Copy/Clone traits are not implemented/derived. For instance if 1000 instances of a ZST are deserialized, and the ZST is not copy (this can be achieved through a singleton), then accessing/writing to deserialized data will cause a segmentation fault. There is currently no way for borsh to read data without also providing a Rust type. Therefore, if you are not using ZST for serialization, then you are not affected by this issue.
Metadata
Created: 2023-04-17T16:32:26Z
Modified: 2024-09-23T16:34:09Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/04/GHSA-fjx5-qpf4-xjf2/GHSA-fjx5-qpf4-xjf2.json
CWE IDs: []
Alternative ID: N/A
Finding: F002
Auto approve: 1