GHSA-fjx5-qpf4-xjf2

    Dashboard / Vulnerabilities / GHSA-fjx5-qpf4-xjf2

    GHSA-fjx5-qpf4-xjf2

    Published: 17 Apr 2023Last Modified: 23 Sept 2024

    Summary: Parsing borsh messages with ZST which are not-copy/clone is unsound

    Details: 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.

    Affected packages

    Package

    Name: borsh

    Purl: pkg:cargo/borsh

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -1.0.0-alpha.1

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-fjx5-qpf4-xjf2 | CVE-DB