Parsing borsh messages with ZST which are not-copy/clone is unsound
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | borsh (crates.io) | before 1.0.0-alpha.1 | 1.0.0-alpha.1 | Patch available | GHSA-fjx5-qpf4-xjf2 |
- borsh (crates.io) Vendor— Affected before 1.0.0-alpha.1 Fixed in 1.0.0-alpha.1 Patch available GHSA-fjx5-qpf4-xjf2
Remediation
- Fix · GHSA-fjx5-qpf4-xjf2 borsh (crates.io) Fixed in 1.0.0-alpha.1 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-fjx5-qpf4-xjf2
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences