Skip to content

LOW: webhook secret has no max length — 10 MB secret causes CPU DoS on delivery HMAC computation #79

Description

@walidboulanouar

Problem

apps/api/src/routes/webhooks.ts line 47:

secret: z.string().min(16, 'secret must be at least 16 characters'),

No .max() bound. A caller can register a webhook with a 10 MB secret. Every outbound delivery calls crypto.subtle.importKey on that secret — CPU-intensive in Workers. With enough endpoints this becomes a DoS on delivery throughput.

Fix

Add .max(512) to the secret schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions