GHSA-4rmq-mc2c-r495 Babylon Incorrect FP inactive accounting in costaking creates “phantom stake” that earns rewards after BTC unbond

Not scored Published

A state consistency bug allows attackers to earn costaking rewards without backing BTC by exploiting a race condition during unbonding.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-4rmq-mc2c-r495?

GHSA-4rmq-mc2c-r495 is a vulnerability in github.com/babylonlabs-io/babylon, published on 9 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Which versions are affected by GHSA-4rmq-mc2c-r495?

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

PackageAffectedFixed in
github.com/babylonlabs-io/babylon GoAll versionsNone
github.com/babylonlabs-io/babylon GoAll versions to 1.1.0None
github.com/babylonlabs-io/babylon GoAll versions to 1.1.0None
github.com/babylonlabs-io/babylon/v2 GoAll versionsNone
github.com/babylonlabs-io/babylon/v2 GoAll versions to 2.3.2None
github.com/babylonlabs-io/babylon/v2 GoAll versions to 2.3.2None
6 more packages
github.com/babylonlabs-io/babylon/v3 GoAll versionsNone
github.com/babylonlabs-io/babylon/v3 GoAll versions to 3.0.0-snapshot.250805aNone
github.com/babylonlabs-io/babylon/v3 GoAll versions to 3.0.0-snapshot.250805aNone
github.com/babylonlabs-io/babylon/v4 GoAll versions4.2.0
github.com/babylonlabs-io/babylon/v4 GoAll versions4.2.0
github.com/babylonlabs-io/babylon/v4 GoAll versions4.2.0

How do I fix GHSA-4rmq-mc2c-r495?

Apply the vendor's patch.

Is GHSA-4rmq-mc2c-r495 being exploited?

There is no known exploitation of GHSA-4rmq-mc2c-r495 in the wild and no public exploit code.

Sources

Also known as GO-2025-4214.

Is GHSA-4rmq-mc2c-r495 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free