Skip to content
Fencer Intel
high 7.5

GHSA-j8hr-pjhm-6h27 json

Transaction readers accept trailing bytes, so a parsed transaction can carry another transaction id

published 4d ago modified 2d ago also RUSTSEC-2026-0498 , RUSTSEC-2026-0500

cvss
7.5
version 3.1, OSV
cisa kev
Not listed
not in CISA's catalog
epss
—
no score, EPSS covers CVEs only
public exploits
0
none known

Summary

`Transaction::from_binary` and `Transaction::from_hex` read one transaction from the front of their input, did not check that the input ended there, and kept the whole input as the transaction's cached serialization: `to_binary`, `to_hex` and `id()` then answered for bytes that are not the transaction's. `Transaction::from_json`, given a `hex` field, reads it through `from_hex` and answers the same. `from_ef`, `from_hex_ef` and `parse_script_offsets` also read a prefix.

An application that takes bytes or hex from outside, parses them with these readers and then uses `id()` or the serialization could be given one transaction under another identity: the same parsed fields, a different id. An application that passes them only bytes it produced or has already checked is not affected.

0.8.5 refuses a byte after the transaction; `Transaction::from_reader` reads from the front of a longer buffer. Where upgrading is not possible, parse with `Transaction::from_binary`, call `tx.invalidate_caches()` (public from 0.3.16) and require `tx.to_binary() == bytes`.

Patch / fix

  • crates.io bsv-rs 0.8.5, 0.9.0-beta.7.0

Is GHSA-j8hr-pjhm-6h27 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CVSS scores

assigned by version score vector
OSV 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
OSV 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
crates.io bsv-rs
>=0.0.0-0, <0.8.5
>=0.9.0-beta.1, <0.9.0-beta.7.0
0.8.5
0.9.0-beta.7.0

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.