# GHSA-84xq-3662-pvx5: Transaction::from_json holds an input txid that is not 64 hex digits and writes the input as spending the zero txid

- Severity: Medium 5.3 (CVSS:3.1, scored by RustSec Advisory Database) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-11-11T12:00:00.000Z
- Modified: 2026-11-12T08:00:03.171Z
- Also known as: RUSTSEC-2026-0497

## Description

`Transaction::from_json`, for a document with no `hex` member, held each
input's `txid` member as given. An input `txid` that is not 64 hex digits
(`"zz"`, `""`, 63 or 65 digits, characters that are not hex digits) answered
`Ok`: `source_txid` and `to_json` gave the text back, while `to_binary` wrote
the input as spending the txid of 32 zero bytes and `id()` hashed those bytes.
Documents naming different texts were one transaction, spending an outpoint
none of them named.

An application that reads a peer's transaction document with `from_json` and
relies both on the text of its inputs and on its bytes or `id()` is affected;
one that reads only documents it produced is not.

0.8.6 refuses such a txid (`Invalid txid of input N: expected 64 hex digits`).
Where upgrading is not possible, require each input's `txid` to be 64 ASCII hex
digits before calling `from_json`.

(As written by RustSec Advisory Database.)

## Affected

- bsv-rs (crates.io): from 0.0.0-0 before 0.8.6; from 0.9.0-beta.1 before 0.9.0-beta.7.0

## References

- <https://crates.io/crates/bsv-rs> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0497.html> (advisory)
- <https://github.com/Calhooon/bsv-rs/blob/v0.8.6/CHANGELOG.md> (web)
- <https://github.com/Calhooon/bsv-rs/issues/845> (report)
- <https://github.com/Calhooon/bsv-rs/pull/856> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0497](https://rustsec.org/advisories/RUSTSEC-2026-0497.html), CC0-1.0, modified 2026-11-12

---

Page: https://cve.day/GHSA-84xq-3662-pvx5 · Whole record: https://cve.day/GHSA-84xq-3662-pvx5.json · Rebuilt by cve.day 2026-11-25T22:56:43.487Z
