Skip to content
Access control Write-up Advanced

State divergence enables unauthorized access

An access-control check on the Provenance blockchain read a stale supply field that stays zero for non-fixed markers, so the check passed for any caller with no tokens. An attacker could grant themselves admin, mint and withdraw permissions on affected markers and then mint tokens or drain escrowed assets.

blog.trailofbits.com

Published on blog.trailofbits.com

We found and reported a bug in Provenance Blockchain, a public proof-of-stake chain built on Cosmos SDK, that lets any user grant themselves admin control over marker accounts without holding a single token. Provenance covers a range of financial services, including on-chain tokenized loans, private equity tokens…

The author, on blog.trailofbits.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The authorization check compared the caller's balance against a supply value stored on the marker struct that is never updated for non-fixed markers, so the comparison was always true for a caller with no tokens.

Impact

82 live markers were exploitable, allowing withdrawal of roughly 30 × 1015 nhash in escrow (about $500,000 at the time) and arbitrary minting of tokens such as bridged stablecoins and tokenized assets, with harm depending on the token's restrictions.

What the attacker needed

No tokens or account privileges needed; target is a non-fixed marker with zero stored supply

The fix

The full fix was to read both sides of the comparison from the bank module and to return false whenever live supply is zero; an earlier mitigation only added the zero-supply guard.

How it was found

  1. Send a single message requesting admin, mint and withdraw permissions on a target marker.
  2. The authorization check passes because the stored supply is zero and the caller holds no tokens.
  3. Send a second message to mint new tokens of the marker's denomination or to withdraw assets from its escrow balance.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A blockchain keeps records of who owns what, and some records are meant to be updated in two places at once. Here one of those places was never updated, so a rule saying 'you may take control only if you own every token' was checked against a number that was always zero, which matched the attacker's own zero balance. That let anyone give themselves control of token accounts and then create new tokens or take the funds held in them.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.