MEDIUM · CVSS 3.1 5.3

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

Published 2026-11-11 · Updated 2026-11-12 · Also known as RUSTSEC-2026-0499

Summary

The bsv-rs library contains a signature parsing flaw where `Signature::from_der` leniently processes malformed or extended DER-encoded ECDSA signatures. Engineering and security teams using affected versions of bsv-rs should update to the patched releases.

Who is affected

Applications using functions like `messages::verify`, `compat::bsm::verify_message_der`, certificate verifications, or wallet signature checks accept improperly formatted signatures as valid. Given a single valid signature, an attacker can produce alternative byte strings that verify successfully over the same data. Applications that compare, hash, or store signature bytes rather than acting solely on the verification verdict are affected.

Exploitability

The vulnerability has a CVSS 3.1 base score of 5.3 (MEDIUM) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N, indicating network exploitability with low complexity and no privileges required, resulting in low integrity impact. EPSS is not yet available, and CISA KEV status is no, meaning active exploitation is not documented.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
crates.io bsv-rs >= 0.0.0-0, < 0.8.6 0.8.6 cargo update -p bsv-rs --precise 0.8.6
crates.io bsv-rs >= 0.9.0-beta.1, < 0.9.0-beta.7.0 0.9.0-beta.7.0 cargo update -p bsv-rs --precise 0.9.0-beta.7.0

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityLow
AvailabilityNone

FAQ

What causes the invalid signatures to be accepted?

Signature::from_der read DER-encoded ECDSA signatures leniently, accepting extra trailing bytes, incorrect sequence lengths, and unnecessary zero padding on R or S values.

Does this flaw allow attackers to forge signatures over arbitrary data?

No. The modified byte strings only verify successfully over the exact same data as the original valid signature.

Are signature bytes guaranteed to be completely unique after applying the patch?

No. A signature's bytes are still not unique because the same signature with S replaced by n - S will also verify, requiring applications that key on bytes to also use `Signature::is_low_s()`.

Original advisory 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()`.

References

Source records: RUSTSEC-2026-0499 (OSV.dev).