Skip to content
PATCH

Risky Token-2022 extensions

Learned from Known attack pattern

In plain words

Some token settings let one party move tokens out of any wallet, or run code that can block selling.

Spec

SIG 0xB31E90AB-03
antibody
Risky Token-2022 extensions
learned
Known attack pattern
weakness
A permanent delegate can move or burn tokens from any holder; a transfer hook runs a program on every transfer.
reads
Mint account owned by the Token-2022 program: extension TLVs (permanentDelegate, transferHook) via getAccountInfo jsonParsed
match
permanentDelegate set (HIGH) · transferHook with a program id set (MEDIUM)
not a hit
classic SPL Token mints (no extensions) · Token-2022 mints without these extensions · extension present but empty
severity
permanent delegate HIGH · transfer hook MEDIUM
fix
A permanent delegate cannot be removed from an existing mint: explain publicly who holds it and why, or migrate to a new mint without it.

01

The attack it came from

Known attack pattern. This antibody covers a known attack pattern rather than one incident.

02

For engineers

Reads: Mint account owned by the Token-2022 program: extension TLVs (permanentDelegate, transferHook) via getAccountInfo jsonParsed.

Match: permanentDelegate set (HIGH) · transferHook with a program id set (MEDIUM).

Not a hit: classic SPL Token mints (no extensions) · Token-2022 mints without these extensions · extension present but empty.

Severity: permanent delegate HIGH · transfer hook MEDIUM.

Passive and read-only. Runs in the public census.

03

Known false positives

Regulated asset tokens can use a permanent delegate on purpose (for example to comply with court orders). We only mark one as expected after verifying the issuer; until then it is counted, and the record notes it.

04

Census result

64 of 200 checked targets matched.

critical 0high 64medium 0low 0

Source: census_runs (latest finished run), census of 2026-11-27. Totals only: projects are never named.

05

What a team should do

  1. 01A permanent delegate cannot be removed from an existing mint: explain publicly who holds it and why, or migrate to a new mint without it.
  2. 02For a transfer hook: make the hook program immutable or multisig-controlled, and document what it does on each transfer.

PATCH recommends the fix. The team applies it. Nothing is changed for them.

06

What this antibody can't detect

What a transfer-hook program actually does. It does not read the hook's code.