Skip to content

verifier: simple-signing payload digest binding is not independently validated #198

Description

@samuv

Surfaced during review of #197 (pre-existing, applies to both keyless and key-signed flows — filing separately as requested there).

container/verifier's bundle reconstruction never parses the simple-signing payload's critical.image.docker-manifest-digest. Both the bundle's MessageDigest and the verification policy's artifact digest derive from the registry-supplied layer.Digest.Hex, so sigstore-go's digest cross-check is tautological: it proves the signature covers the payload layer, but not that the payload's embedded manifest digest matches the artifact actually being verified (CWE-354 / OWASP A08:2021).

Exploitation requires registry compromise (serving a signature manifest whose payload binds a different artifact digest), but this package is becoming the trust anchor for ToolHive's skill verification (stacklok/toolhive#5899), so the binding should be validated explicitly:

  • parse the simple-signing payload JSON after signature verification,
  • compare critical.image.docker-manifest-digest against the digest of the artifact under verification,
  • fail closed on mismatch or unparsable payload.

Refs: #192, #197, sigstore.go's getSimpleSigningLayersFromSignatureManifest / getBundleMsgSignature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue needs initial triage by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions