CVE-2026-133754: UrlGenerator Lets Host Placeholder Values Send Generated URLs to Another Host
UrlGenerator puts the values of host placeholders into the generated URL without encoding them. Their default requirement, [^.]++, accepts /, @, #, ?, \, % and :. With the host {tenant}.example.com, the value evil%2Ecom# gives https://evil%2Ecom#.example.com/dashboard, which browsers send to evil.com. This works even when requirements are checked. Unicode full stops like 。 have the same effect, since IDNA maps them to ..
Applications are exposed when untrusted values reach host placeholders, for example when they pass the query string of the request to url(). A route that uses RedirectController::redirectAction() with keepQueryParams: true does the same, when the target route has a host placeholder that the redirecting route doesn't define.
UrlGenerator now rejects host placeholder values that contain a character that is forbidden in a host. These characters are C0 controls, space, #, %, /, :, <, >, ?, @, [, \, ], ^, | and DEL. Unicode full stops are rejected too. This check applies whatever strictrequirements is set to. When strictrequirements is false or null, the generator logs an error and returns an empty string instead of throwing. Host placeholder values can still be an IPv6 literal like [::1], but they can't contain a port anymore.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed?
Applications are exposed when untrusted data can reach a route host placeholder. Examples include passing request query-string values to url(), or using RedirectController::redirectAction() with keepQueryParams: true when the target route has a host placeholder that the redirecting route does not define.
Does enabling route requirements or strict_requirements prevent exploitation?
No. The default host-placeholder requirement accepts characters that can alter browser host interpretation, and the issue works even when requirements are checked. The updated rejection check applies regardless of the strict_requirements setting.
What behavior should be expected after applying the fix?
Host placeholder values containing forbidden host characters, including Unicode full stops, are rejected. With strict_requirements set to false or null, URL generation logs an error and returns an empty string rather than throwing an exception.
How can I identify potentially affected code?
Review routes with host placeholders and trace every value supplied to those placeholders. Prioritize values derived from request query parameters and RedirectController redirects that preserve query parameters.