Advisory

RUSTSEC-2026-0499

Also known as: GHSA-9c8r-76f3-m426

Summary

Signature::from_der reads a signature with bytes after it, a wrong sequence length or an unneeded zero as the signature

Details

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().

Severity

Medium Basis: CVSS v3 score 5.3, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Dates

Published
2026-11-11 12:00 UTC
Modified
2026-11-12 08:00 UTC

Affected packages and fixes

bsv-rs

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.8.6, introduced 0.9.0-beta.1, fixed 0.9.0-beta.7.0 (semver)

Fixed versions

0.8.6, 0.9.0-beta.7.0

Fix

  • Fixed version 0.8.6
    cargo update -p bsv-rs --precise 0.8.6
  • Fixed version 0.9.0-beta.7.0
    cargo update -p bsv-rs --precise 0.9.0-beta.7.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences