# CVE-2026-40070: bsv-sdk and bsv-wallet persist unverified certifier signatures in acquire_certificate (direct and issuance paths)

> Attackers can forge identity certificates in the BSV Ruby SDK by bypassing signature verification, leading to fraudulent certificate storage and validation.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Apr 2026
- **Updated:** 13 Apr 2026
- **Also known as:** GHSA-hc36-c89j-5f4j

## What is CVE-2026-40070?

CVE-2026-40070 is a high-severity vulnerability in sgbett bsv-ruby-sdk, published on 9 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

BSV Ruby SDK is the Ruby SDK for the BSV blockchain. From 0.3.1 to before 0.8.2, BSV::Wallet::WalletClient#acquire_certificate persists certificate records to storage without verifying the certifier's signature over the certificate contents. In acquisition_protocol: 'direct', the caller supplies all certificate fields (including signature:) and the record is written to storage verbatim. In acquisition_protocol: 'issuance', the client POSTs to a certifier URL and writes whatever signature the response body contains, also without verification. An attacker who can reach either API (or who controls a certifier endpoint targeted by the issuance path) can forge identity certificates that subsequently appear authentic to list_certificates and prove_certificate.

Weakness: CWE-347 (Improper Verification of Cryptographic Signature)

## Which versions are affected by CVE-2026-40070?

4 open source packages ship an affected version, including bsv-sdk and bsv-wallet. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bsv-sdk` | RubyGems | From 0.3.1 | 0.8.2 |
| `bsv-sdk` | RubyGems | From 0.3.1 | 0.8.2 |
| `bsv-wallet` | RubyGems | From 0.1.2 | 0.3.4 |
| `bsv-wallet` | RubyGems | From 0.1.2 | 0.3.4 |

Products: Sgbett Bsv-Wallet, Sgbett Bsv Ruby Sdk.

## How do I fix CVE-2026-40070?

Upgrade bsv-sdk to 0.8.2 or later.

## Is CVE-2026-40070 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40070 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40070 and fix it if it is affected.

What it is: CVE-2026-40070 is a high-severity vulnerability in sgbett bsv-ruby-sdk, published on 9 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40070 exists.

Affected packages and fixed versions:
- bsv-sdk (RubyGems): affected from 0.3.1; fixed in 0.8.2
- bsv-sdk (RubyGems): affected from 0.3.1; fixed in 0.8.2
- bsv-wallet (RubyGems): affected from 0.1.2; fixed in 0.3.4
- bsv-wallet (RubyGems): affected from 0.1.2; fixed in 0.3.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40070/ (Markdown: https://insights.sbomify.com/CVE-2026-40070/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40070
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40070
- OSV: https://osv.dev/vulnerability/CVE-2026-40070

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40070/
Summaries are generated and may contain mistakes; the official description above is the record.
