# GHSA-WGV4-FRV7-C8C5: UrlGenerator Lets Host Placeholder Values Send Generated URLs to Another Host

- Database: GitHub
- Severity: CVSS 5.3 (Medium)
- Published: 2026-11-25
- Modified: 2026-11-25

## Tracked as

- [CVE-2026-133754](https://cve.now/CVE-2026-133754.md): Symfony open redirect in UrlGenerator via host placeholders

## Affected versions

- symfony/routing (Packagist): fixed in 5.4.57
- symfony/routing (Packagist): from 6, fixed in 6.4.51
- symfony/routing (Packagist): from 7, fixed in 7.4.24
- symfony/routing (Packagist): from 8, fixed in 8.1.12
- symfony/symfony (Packagist): fixed in 5.4.57
- symfony/symfony (Packagist): from 6, fixed in 6.4.51
- symfony/symfony (Packagist): from 7, fixed in 7.4.24
- symfony/symfony (Packagist): from 8, fixed in 8.1.12

## Description

### Description

`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.

### Resolution

`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 `strict_requirements` is set to. When `strict_requirements` 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.

The patch for this issue is available [here](https://github.com/symfony/symfony/commit/73505be32fd675507f3572f5b89ed0a76733bf2f) for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).

### Credits

We would like to thank Nicolas Grekas for reporting the issue and providing the fix.

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-wgv4-frv7-c8c5

Page: https://cve.now/GHSA-WGV4-FRV7-C8C5

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
