Skip to content

fix(security): critical CLPc identity interface mismatch#15

Merged
boris merged 1 commit intomainfrom
security/fix-identity-interface-mismatch
Feb 23, 2026
Merged

fix(security): critical CLPc identity interface mismatch#15
boris merged 1 commit intomainfrom
security/fix-identity-interface-mismatch

Conversation

@boris
Copy link
Copy Markdown
Collaborator

@boris boris commented Feb 19, 2026

Vulnerability

Critical interface mismatch between CLPc and the deployed verifier contract.

CLPc calls isVerifiedChilean(address) but the deployed mock verifier exposes isVerified(address).
This can break verification-gated minting/transfers at runtime.

Changes in this PR

  • add ZKPassportIdentityRegistryAdapter implementing IIdentityRegistry
  • map isVerifiedChilean(user) -> verifier.isVerified(user)
  • update deployment script to deploy:
    1. MockZKPassportVerifier
    2. ZKPassportIdentityRegistryAdapter
    3. CLPc using the adapter as identity registry
  • add security write-up with exploit/repro and remediation steps:
    • docs/security/01-critical-interface-mismatch.md

How to verify / exploit (old behavior)

  1. Deploy old script wiring verifier directly into CLPc.
  2. Verify a user in verifier.
  3. Call CLPc mint/transfer path that checks verification.
  4. Observe failure due to missing isVerifiedChilean selector on verifier.

Remediation / migration steps

  1. Deploy with updated script (verifier + adapter + token).
  2. Update addresses in runtime env/config.
  3. Re-run smoke checks:
    • verify user in verifier
    • canReceive(user)
    • mint to verified user
    • transfer verified -> verified
  4. Mark old deployment as deprecated/incompatible.

@boris boris merged commit 108e921 into main Feb 23, 2026
1 check passed
@boris boris deleted the security/fix-identity-interface-mismatch branch February 23, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant