Skip to content

fix(payments-next): [f006] CMS webhook secret length leaked via timingSafeEqual exception#20862

Open
elizabeth-ilina wants to merge 1 commit into
mainfrom
PAY-3799-f-006
Open

fix(payments-next): [f006] CMS webhook secret length leaked via timingSafeEqual exception#20862
elizabeth-ilina wants to merge 1 commit into
mainfrom
PAY-3799-f-006

Conversation

@elizabeth-ilina

@elizabeth-ilina elizabeth-ilina commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Because

  • No length pre-check in verifyWebhookSignature let an attacker learn the secret's byte-length by observing 500 vs 200 responses.
  • Auth failures returned 200 {success:true}

This pull request

  • Makes handleValidationWebhook return 401 on auth failure instead of silently returning 200.
  • Note: the length check was implemented in the PR for PAY-3780, here

Issue that this pull request solves

Closes: #PAY-3799

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on:
  • Suggested review order:
  • Risky or complex parts:

Screenshots (Optional)

image

Other information (Optional)

Any other information that is important to this pull request.

…gSafeEqual exception

Because:

* No length pre-check in verifyWebhookSignature let an attacker learn the secret's byte-length by observing 500 vs 200 responses.
* Auth failures returned 200 {success:true},

This commit:

* Makes handleValidationWebhook return 401 on auth failure instead of silently returning 200.
* Note: the length check was implemented as part of PAY-3780.

Closes #[PAY-3799](https://mozilla-hub.atlassian.net/browse/PAY-3799)
@elizabeth-ilina elizabeth-ilina marked this pull request as ready for review July 14, 2026 17:28
@elizabeth-ilina elizabeth-ilina requested a review from a team as a code owner July 14, 2026 17:28
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