LayerZeroFault
ERC-4337 & Safe CODE: GS026 Reviewed & Verified:

Safe Multisig Error GS026: Invalid Owner Provided Signer Fix

Verified by Victor Vance • Lead Technical Analyst & Systems Researcher
Quick Diagnostic Answer (Executive Summary) GSC Snippet Verified

Safe multisig error GS026 "Invalid owner provided" occurs during execTransaction when one of the recovered signature addresses is not an authorized owner of the Safe, or when multiple signatures are not sorted in strictly ascending numerical order. Safe contracts enforce lexicographical address sorting (owner1 < owner2) to eliminate duplicate signature replay. Sort all owner signatures by address before submitting, and verify active owners on-chain using the getOwners call.

# Root Cause & Technical Architecture

Inside `GnosisSafe.checkSignatures()`, the contract loops through the concatenated 65-byte signature bytes and recovers signer addresses using `ecrecover`. To guarantee uniqueness without quadratic gas loops, Safe enforces: `require(currentOwner > lastOwner && isOwner(currentOwner), "GS026")`. If two signatures are out of order, if an address appears twice, or if a signer was recently removed from the Safe, the assertion fails with `GS026`.

# 4-Step Actionable Diagnostic Protocol

Step-by-Step Resolution
01

Sort Owner Signatures by Address in Ascending Order

Order signatures numerically: address(signer1) < address(signer2). Concatenating signatures in arbitrary order guarantees a GS026 revert.

02

Verify Active Safe Ownership on Target Network

Call safe.getOwners() on-chain to verify that every private key that signed the transaction is currently registered as an active owner.

03

Check v-Value Normalization for EIP-712 Signatures

Ensure the recovery identifier byte (v) is properly normalized to 27 or 28 (or 31/32 for eth_sign ledger mode) per Safe specifications.

04

Audit Threshold Configuration Against Signature Count

Confirm that the total number of provided valid owner signatures meets or exceeds safe.getThreshold().

# Diagnostic Verification Code / Command

typescript
sort-safe-signatures.ts
// Sort Safe signatures in strictly ascending order of signer address
interface OwnerSignature {
  signer: `0x${string}`;
  data: string; // 65-byte hex signature (r + s + v)
}

function packSortedSignatures(signatures: OwnerSignature[]): string {
  // Sort numerically ascending (GS026 prevention rule: currentOwner > lastOwner)
  const sorted = [...signatures].sort((a, b) => 
    BigInt(a.signer) < BigInt(b.signer) ? -1 : 1
  );

  // Concatenate sorted signature hex strings
  return '0x' + sorted.map(s => s.data.replace('0x', '')).join('');
}
Zero-Secrets Client Sandbox

Launch ERC-4337 UserOp Decoder

Execute client-side cryptographic simulation and parameter checks safely in your browser via native WebCrypto without sending private keys or mnemonics over the wire.

Open Sandbox →
Comprehensive In-Depth Guide

Read Full Investigation & Recovery Workflow

Explore complete architectural diagrams, edge-case failure trees, and detailed post-mortem analysis in our verified deep guide.

Read Guide →

# Related Diagnostic Codes in ERC-4337 & Safe

Related Hex Statuses

# Frequently Asked Questions

FAQ Schema

Why does Safe require signatures to be sorted by address?

Sorting by address allows the Safe smart contract to verify in a single O(N) loop that all signers are unique and valid without duplicate signature exploits.

Can I reuse an old signature if owner ordering is maintained?

No. Safe incorporates a monotonic nonce into the transaction hash, so signatures cannot be replayed for subsequent transactions.

Does GS026 occur if an owner was removed after signing?

Yes. If a signer was an owner when they signed off-chain but was removed on-chain before the transaction was broadcast, GS026 will be thrown.