Skip to content

security/leaked-secrets: Supabase/storage signed-URL tokens (?token=eyJ… in img/og:image) flagged as JWT leaks: 57% of JWT flags #1293

Closed

Description

@nc9

JSON Web Token matches signed URL tokens: per-object, short-lived access grants that are public by design. In hand verification of 514 JWT/bearer flags from a ~38k-site batch (v0.0.141), 295 flags on 27 sites (57%) were storage signed-URL tokens:

  • https://<project>.supabase.co/storage/v1/object/sign/<bucket>/<path>?token=eyJ… in <img src>, srcset, og:image/twitter:image and inline JSON
  • the same shape in other storage or CDN signers (?token=, ?jwt=, ?sig= query values)

The token only grants a GET on that one object until it expires, and the page has to render it to show the image. Separately, per-request platform tokens (Shopify's, #1287) and decoder-tool samples (#1283) are already tracked.

Acceptance Criteria

  • A JWT that is the value of a URL query parameter (token, jwt, sig, signature, access_token, X-Amz-*) inside an attribute URL or a URL string, with an exp claim and a url claim, is relabelled "Signed URL Token (JWT)" and reported at medium confidence, not as a generic JWT and not as public by design, because a signed URL token can still grant access until it expires. Fixtures: a Supabase storage signed URL in img src and in og:image. (amended 2026-11-01)
  • A Supabase service_role or sb_secret_ key is still reported wherever it appears, including inside a URL (fixture).
  • The rule docs describe signed URLs (under "Public client keys and signed URLs"). (amended 2026-11-01)

Activity

  1. added
    bug
    on Oct 29, 2026
  2. added theissue type on Oct 29, 2026
  3. nc9 commented on Nov 1, 2026

    @nc9
    ContributorAuthor

    Amended the acceptance criteria to the shipped behaviour. A JWT in a signed-URL parameter is relabelled "Signed URL Token (JWT)" and reported at medium confidence, not downgraded to info: a signed URL token can still grant access until it expires. A service_role or admin-scope token, an alg: none token and an anon token keep their previous classification, including inside a signed URL. The docs describe the tier.

    nik

  4. nc9 commented on Nov 1, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.158 and checked against it: every acceptance criterion is met. One wording fix to criterion 1: the label needs an exp claim and a url claim (my earlier amendment also said "or a /object/sign/ path", which the code does not do: a sign path alone does not relabel). A service_role or sb_secret_ key still reports inside a URL, and the docs describe the tier. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.158

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions