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 Nov 11, 2026
·
Updated

Signature::fromder 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::verifymessageder, auth::Certificate::verify, auth::VerifiableCertificate::verify, wallet::ProtoWallet::verifysignature and kvstore::KVStoreInterpreter::verifysignature 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::islows().

Affected Software

2 affected componentsFixes available
rust/bsv-rs>=0.0.0-0<0.8.6
0.8.6
rust/bsv-rs>=0.9.0-beta.1<0.9.0-beta.7.0
0.9.0-beta.7.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/bsv-rs to a version that resolves this vulnerability.

    Fixed in 0.8.6
  2. Upgrade

    Upgrade rust/bsv-rs to a version that resolves this vulnerability.

    Fixed in 0.9.0-beta.7.0
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.8.6
  4. Compensating control

    Require signatures to use low-S form by checking Signature::is_low_s(), because replacing S with n - S can otherwise produce another valid signature over the same data.

Event History

Nov 11, 2026
Advisory Published
via OSV·12:00 PM
Data Sourced
via OSV·12:00 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which applications are actually at risk from this issue?

Applications that only use signature verification as a yes/no verdict are not affected. Risk applies when an application compares, hashes, stores, or otherwise treats the raw signature bytes as a unique identifier or value.

2

What does an attacker need to exploit it?

An attacker needs a valid signature over the same data, such as one produced by the key holder. They can then create alternate byte encodings that verify as that original signature, but cannot make those encodings verify for different data.

3

Which verification paths accepted these alternate encodings?

The affected parsing behavior was reached through messages::verify, compat::bsm::verify_message_der, auth::Certificate::verify, auth::VerifiableCertificate::verify, wallet::ProtoWallet::verify_signature, and kvstore::KVStoreInterpreter::verify_signature.

4

What version changes the DER parsing behavior?

Version 0.8.6 rejects the described malformed or non-canonical DER forms with Error::InvalidSignature. It rejects signatures with trailing bytes, inconsistent sequence lengths, unnecessary leading zeroes in R or S, and lone-zero R or S values.

5

Is upgrading sufficient when signature bytes are used as identifiers?

No. Even after the parsing fix, ECDSA signatures are not unique because replacing S with n - S can produce another valid signature. Applications that key on signature bytes also need to enforce Signature::is_low_s().

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203