Skip to content

Verifier accepts signed non-authorizing receipt statuses #49

@manuelsampedro1

Description

@manuelsampedro1

Summary

The local Permission Protocol verifier accepts any signed, unexpired receipt status except lowercase revoked. A valid Ed25519 signature over a non-authorizing status such as DENIED, PENDING, or EXPIRED can therefore return success from pp verify / verifyReceipt if the signature verifies and the receipt is unexpired.

This is an acceptance-semantics flaw in the signing/verification flow: the signature can be mathematically valid, but the signed lifecycle state does not authorize execution.

Why this matters

Downstream gates commonly treat verifier success / exit code 0 as the authorization decision. If any issuer path, migration, compatibility layer, or imported receipt can produce a signed receipt with a non-authorizing lifecycle state, local consumers can accept it as approved because the verifier only rejects status === "revoked".

Relevant current logic in permission-protocol/pp-cli:

const status = String(receipt.status);
if (expiresAt.getTime() <= now.getTime() || status === "revoked") {
  return { verified: false, ... };
}

return { verified: true, ... };

Reproduction

I opened a fix with a regression test here:

permission-protocol/pp-cli#2

The test:

  1. Loads a known-valid fixture.
  2. Changes the signed status field to DENIED.
  3. Re-signs the canonical receipt bytes with the fixture Ed25519 private key, so the signature is valid for the modified receipt.
  4. Verifies the receipt with the matching public key.

Before the fix, this kind of receipt would pass because it is signed, unexpired, and not lowercase revoked. After the fix, it fails closed.

Suggested fix

Only accept the v1 authorizing status (valid) as verification success. Treat revoked as expired/revoked and reject every other status (DENIED, PENDING, EXPIRED, casing variants, unknown future values) as malformed/non-authorizing unless a future receipt version explicitly defines different semantics.

Bounty note

Related to #36: this is not a raw Ed25519 forgery; it is a flaw in the receipt verification acceptance flow where a valid signature over non-authorizing signed content can be accepted as authorization-valid by local consumers.

Validation for the PR:

  • npm ci
  • npm test -- --run
  • npm run build
  • git diff --check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions