# GHSA-xq4h-wqm2-668w: Babylon's BIP322 signature implementation is not fully compliant to the spec

> Attackers can submit non-compliant BIP-322 signatures that are incorrectly accepted by the blockchain, bypassing signature verification requirements.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Nov 2025
- **Also known as:** GO-2025-4159

## What is GHSA-xq4h-wqm2-668w?

GHSA-xq4h-wqm2-668w is a vulnerability in github.com/babylonlabs-io/babylon, published on 24 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Summary

The BIP-322 signature verification does not enforce the SIGHASH value to be SIGHASH_ALL, and therefore is not strictly following the [spec](https://bips.dev/322/).

### Impact

Non-compliant BIP-322 signatures in proof of possessions can be accepted by the chain.

## Which versions are affected by GHSA-xq4h-wqm2-668w?

6 open source packages ship an affected version, including github.com/babylonlabs-io/babylon/v4, github.com/babylonlabs-io/babylon and github.com/babylonlabs-io/babylon/v2.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/babylonlabs-io/babylon/v4` | Go | All versions | 4.1.0 |
| `github.com/babylonlabs-io/babylon/v4` | Go | All versions | 4.1.0 |
| `github.com/babylonlabs-io/babylon/v4` | Go | All versions | 4.1.0 |
| `github.com/babylonlabs-io/babylon` | Go | All versions | None |
| `github.com/babylonlabs-io/babylon/v2` | Go | All versions | None |
| `github.com/babylonlabs-io/babylon/v3` | Go | All versions | None |

## How do I fix GHSA-xq4h-wqm2-668w?

Upgrade github.com/babylonlabs-io/babylon/v4 to 4.1.0 or later.

## Is GHSA-xq4h-wqm2-668w being exploited?

There is no known exploitation of GHSA-xq4h-wqm2-668w in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-xq4h-wqm2-668w and fix it if it is affected.

What it is: GHSA-xq4h-wqm2-668w is a vulnerability in github.com/babylonlabs-io/babylon, published on 24 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-xq4h-wqm2-668w in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/babylonlabs-io/babylon/v4 (Go): affected all versions; fixed in 4.1.0
- github.com/babylonlabs-io/babylon/v4 (Go): affected all versions; fixed in 4.1.0
- github.com/babylonlabs-io/babylon/v4 (Go): affected all versions; fixed in 4.1.0
- github.com/babylonlabs-io/babylon (Go): affected all versions; no fix listed
- github.com/babylonlabs-io/babylon/v2 (Go): affected all versions; no fix listed
- github.com/babylonlabs-io/babylon/v3 (Go): affected all versions; no fix listed

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/GHSA-xq4h-wqm2-668w/ (Markdown: https://insights.sbomify.com/GHSA-xq4h-wqm2-668w/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-xq4h-wqm2-668w

---
From sbomify Insights: https://insights.sbomify.com/GHSA-xq4h-wqm2-668w/
Summaries are generated and may contain mistakes; the official description above is the record.
