MediumGHSA-4rmq-mc2c-r495GO-2025-4214

Babylon Incorrect FP inactive accounting in costaking creates “phantom stake” that earns rewards after BTC unbond

Published 9 Dec 2025 · Updated 15 Dec 2025

Is your project on an affected github.com/babylonlabs-io/babylon/v4?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<4.2.0
Fixed in
4.2.0
Update to the fixed version for your release line, for example:go get github.com/babylonlabs-io/babylon/v4@v4.2.0
Affected
<=3.0.0-snapshot.250805a
Fixed in
No fix released
Affected
<=2.3.2
Fixed in
No fix released
Affected
<=1.1.0
Fixed in
No fix released

Details

Summary

A state consistency bug in x/costaking can leave a BTC delegator with non-zero ActiveSatoshis (Phatom Stake) even after they have fully unbonded their BTC delegation, if their Finality Provider (FP) drops out of the active set in the exact same babylon block height. This creates a “phantom stake”: the delegator’s BTC capital is withdrawn, the FP is inactive, but costaking continues to treat the delegation as active BTC stake allowing ongoing rewards accrual without backing BTC.

Impact

An address can keep earning costaking rewards with zero BTC staked.

Reported by @BottyBott.

Is GHSA-4rmq-mc2c-r495 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/babylonlabs-io/babylon/v4, and gives you the command that fixes it.

More advisories for github.com/babylonlabs-io/babylon/v4

  • LowGO-2025-4211Babylon Nil BlockHash in BLS vote extensions triggers panics in consensus handlers in github.com/babylonlabs-io/babylon · 15 Dec 2025
  • HighGHSA-m6wq-66p2-c8pcBabylon Nil BlockHash in BLS vote extensions triggers panics in consensus handlers · 8 Dec 2025
  • LowGO-2025-4157Babylon's malformed vote extensions are not rejected in github.com/babylonlabs-io/babylon · 25 Nov 2025
  • LowGO-2025-4159Babylon's BIP322 signature implementation is not fully compliant to the spec in github.com/babylonlabs-io/babylon · 25 Nov 2025
  • MediumGHSA-xq4h-wqm2-668wBabylon's BIP322 signature implementation is not fully compliant to the spec · 24 Nov 2025
  • HighGHSA-2fcv-qww3-9v6hBabylon's malformed vote extensions are not rejected · 24 Nov 2025
github.com/babylonlabs-io/babylon/v4 security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.