{"id":"RUSTSEC-2026-0498","aliases":["GHSA-j8hr-pjhm-6h27","RUSTSEC-2026-0500"],"title":"Transaction readers accept trailing bytes, so a parsed transaction can carry another transaction id","titleSource":"OSV","descriptionSource":"OSV","description":"`Transaction::from_binary` and `Transaction::from_hex` read one transaction\nfrom the front of their input, did not check that the input ended there, and\nkept the whole input as the transaction's cached serialization: `to_binary`,\n`to_hex` and `id()` then answered for bytes that are not the transaction's.\n`Transaction::from_json`, given a `hex` field, reads it through `from_hex` and\nanswers the same. `from_ef`, `from_hex_ef` and `parse_script_offsets` also\nread a prefix.\n\nAn application that takes bytes or hex from outside, parses them with these\nreaders and then uses `id()` or the serialization could be given one\ntransaction under another identity: the same parsed fields, a different id.\nAn application that passes them only bytes it produced or has already checked\nis not affected.\n\n0.8.5 refuses a byte after the transaction; `Transaction::from_reader` reads\nfrom the front of a longer buffer. Where upgrading is not possible, parse with\n`Transaction::from_binary`, call `tx.invalidate_caches()` (public from 0.3.16)\nand require `tx.to_binary() == bytes`.","severity":"high","score":7.5,"published":"2026-11-10T12:00:00.000Z","modified":"2026-11-12T08:11:08.643Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"crates.io","name":"bsv-rs","sources":[{"name":"OSV · RUSTSEC-2026-0498","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0498"}],"ranges":[{"events":[{"introduced":"0.0.0-0"},{"fixed":"0.8.5"},{"introduced":"0.9.0-beta.1"},{"fixed":"0.9.0-beta.7.0"}],"type":"SEMVER"}],"versions":[],"fixed":["0.8.5","0.9.0-beta.7.0"]},{"ecosystem":"crates.io","name":"bsv-rs","sources":[{"name":"OSV · RUSTSEC-2026-0500","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0500"}],"ranges":[{"events":[{"introduced":"0.0.0-0"},{"fixed":"0.8.5"},{"introduced":"0.9.0-beta.1"},{"fixed":"0.9.0-beta.7.0"}],"type":"SEMVER"}],"versions":[],"fixed":["0.8.5","0.9.0-beta.7.0"]}],"sourceAffected":[],"references":["https://crates.io/crates/bsv-rs","https://rustsec.org/advisories/RUSTSEC-2026-0498.html","https://github.com/Calhooon/bsv-rs/blob/v0.8.5/CHANGELOG.md","https://github.com/Calhooon/bsv-rs/issues/840","https://rustsec.org/advisories/RUSTSEC-2026-0500.html","https://github.com/Calhooon/bsv-rs/pull/852"],"sources":[{"name":"OSV","id":"RUSTSEC-2026-0498","modified":"2026-11-12T08:11:08.643204332Z","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0498"},{"name":"OSV","id":"RUSTSEC-2026-0500","modified":"2026-11-12T08:11:08.643204332Z","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0500"}],"assessments":[{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3},{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5}],"products":[],"remediation":[],"observedAt":"2026-11-12T13:57:48.105Z","kev":{"status":"unavailable","checkedAt":"2026-11-29T00:35:30.798Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[],"aiSummary":null}