[FrameworkBundle][Mailer] Harden default IP allowlist for Postmark and Brevo webhook parsers#64341
Merged
nicolas-grekas merged 1 commit intoMay 23, 2026
symfony:6.4symfony/symfony:6.4from
nicolas-grekas:harden-mailer-webhook-ip-allowlist-6.4nicolas-grekas/symfony:harden-mailer-webhook-ip-allowlist-6.4Copy head branch name to clipboard
Merged
[FrameworkBundle][Mailer] Harden default IP allowlist for Postmark and Brevo webhook parsers#64341nicolas-grekas merged 1 commit intosymfony:6.4symfony/symfony:6.4from nicolas-grekas:harden-mailer-webhook-ip-allowlist-6.4nicolas-grekas/symfony:harden-mailer-webhook-ip-allowlist-6.4Copy head branch name to clipboard
nicolas-grekas merged 1 commit into
symfony:6.4symfony/symfony:6.4from
nicolas-grekas:harden-mailer-webhook-ip-allowlist-6.4nicolas-grekas/symfony:harden-mailer-webhook-ip-allowlist-6.4Copy head branch name to clipboard
Conversation
This was referenced May 27, 2026
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both bridges shipped
127.0.0.1in their default IP allowlist for testing convenience. Brevo's list was also hardcoded insidegetRequestMatcher()with no override path, so an operator could not remove the loopback entry short of subclassing. Reaching the loopback entry from off-host requires an integrator-side trust-boundary mistake (a misconfigured trusted-proxy chain acceptingX-Forwarded-For: 127.0.0.1, or a co-resident SSRF), so this is hardening rather than a CVE — the framework still shouldn't ship the loopback in the production-default array.Postmark exposes
PROVIDER_IPSas a public const and drops127.0.0.1from the default$allowedIPs. Brevo gains the samePROVIDER_IPSconst, an$allowedIPsconstructor argument (mirroring Postmark), andhash_equals()validation of theAuthorization: Basic base64($secret)header — mirroring the Mailjet parser. An empty$secretskips the check, consistent with the rest of the bridges. Brevo's "Secure webhook calls" documentation currently exposes only IP allowlisting, basic-auth-in-URL, bearer-token, and custom-header options, so basic-auth is the spec-aligned signature path today.To keep local development working out of the box, FrameworkBundle re-adds
127.0.0.1to the allowlists ofmailer.webhook.request_parser.brevoandmailer.webhook.request_parser.postmarkwhenkernel.debugis true. The override is gated by\defined($class.'::PROVIDER_IPS')for BC with older installed bridge versions, and targets the$allowedIPsnamed argument so the two bridges can keep different ctor signatures. The webhook-parser loop also moved aftermailer_webhook.phpis loaded soremoveDefinitionfor unavailable bridge packages actually takes effect.