webhook: answer 200 for a payment id Mollie does not know #90
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-payment#90
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Problem
A well-formed payment id that Mollie does not know makes
payments.getthrow, so the webhook answers 500 (src/server.ts:80-83) and Mollie retries it 10 times over 26 hours. Anyone can post such ids, which also turns the endpoint into an amplifier for our API calls.Mollie docs
Return 200 for unknown ids, so nothing leaks (https://docs.mollie.com/reference/webhooks).
Fix
Catch Mollie 404/422 in
parseCallbackand answer 200. Keep 500 for real failures.Found in the Mollie docs audit of 2026-10-05.
What
POST /webhooks/molliepassesidtopayments.getunchecked. This goes beyond the amplifier risk named here.Why
The SDK only checks the
tr_prefix. It then resolves the path withnew URL("payments/" + id, "https://api.mollie.com/v2/").Failing case
id=tr_x/../../customersresolves tohttps://api.mollie.com/v2/customers.id=tr_x?testmode=trueadds a query. Anyone can make us send authenticated GETs to any Mollie path. The response is stored inprovider_event. Not exploitable whilePAYMENTS_ENABLEDis off.Fix
In
src/server.ts, answer 200 without a Mollie call unlessidmatches/^tr_[A-Za-z0-9]{1,32}$/.Done when
tr_x/../../customersandtr_x?testmode=truenever reachparseCallback.Fixed in #151.
parseCallbackinsrc/provider/mollie.tstreats a Mollie 404 onpayments.getas an unknown id and returns no events, so the webhook answers 200. Other errors still give 500. A malformed id gets 200 before any Mollie call (PAYMENT_IDinsrc/server.ts).