# GHSA-9c8r-76f3-m426: Signature::from_der reads a signature with bytes after it, a wrong sequence length or an unneeded zero as the signature

- 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.174Z
- Also known as: RUSTSEC-2026-0499

## Description

`Signature::from_der` read a DER-encoded ECDSA signature leniently. It read as
the signature: the signature followed by other bytes; a sequence length
shorter than its contents, or longer with bytes after them (a length byte with
its high bit set among them); and an R or S preceded by a zero byte it did not
need. It read a lone-zero R or S as zero.

`messages::verify`, `compat::bsm::verify_message_der`,
`auth::Certificate::verify`, `auth::VerifiableCertificate::verify`,
`wallet::ProtoWallet::verify_signature` and
`kvstore::KVStoreInterpreter::verify_signature` read through it, and each
verified such a form of a valid signature. Given one signature a key holder
made, anyone could produce other byte strings that verify as that signature
over the same data. No form verifies over other data: an application that acts
on the verdict alone is not affected; one that compares, hashes or stores a
signature's bytes is.

0.8.6 refuses each form as `Error::InvalidSignature`. A signature's bytes are
still not unique after the patch: the same signature with S replaced by n - S
verifies, so an application that keys on the bytes also requires
`Signature::is_low_s()`.

(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-0499.html> (advisory)
- <https://github.com/Calhooon/bsv-rs/blob/v0.8.6/CHANGELOG.md> (web)
- <https://github.com/Calhooon/bsv-rs/issues/842> (report)
- <https://github.com/Calhooon/bsv-rs/pull/846> (web)

## Sources

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

---

Page: https://cve.day/GHSA-9c8r-76f3-m426 · Whole record: https://cve.day/GHSA-9c8r-76f3-m426.json · Rebuilt by cve.day 2026-11-25T22:56:43.488Z
