Instruction errors (runtime)

PrivilegeEscalation

Appears as Cross-program invocation with unauthorized signer or writable account

Instruction

PrivilegeEscalation

“Cross-program invocation with unauthorized signer or writable account”

A CPI tried to pass an account as signer or writable when the calling instruction did not have that privilege for it.

Common causes

  • Marking an account writable in a CPI when it was passed read-only to your instruction.
  • Passing a PDA as a signer in a CPI without including its seeds in invoke_signed.
  • Passing a user wallet as a signer in a CPI when the user did not sign the outer transaction.

How to fix it

  • Mark the account writable/signer in the outer instruction, or sign with the right PDA seeds.

Decode another error

Try: