# GHSA-Q2QH-Q4P8-QCMJ: Trailing-Slash and Scheme Redirects Send Paths Starting With // to Another Host

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

## Tracked as

- [CVE-2026-133745](https://cve.now/CVE-2026-133745.md): Symfony open redirect in trailing-slash redirects

## Affected versions

- symfony/framework-bundle (Packagist): from 5.4.44, fixed in 5.4.57
- symfony/framework-bundle (Packagist): from 6.4.12, fixed in 6.4.51
- symfony/framework-bundle (Packagist): from 7.1.5, fixed in 7.4.24
- symfony/framework-bundle (Packagist): from 8, fixed in 8.1.12
- symfony/symfony (Packagist): from 5.4.44, fixed in 5.4.57
- symfony/symfony (Packagist): from 6.4.12, fixed in 6.4.51
- symfony/symfony (Packagist): from 7.1.5, fixed in 7.4.24
- symfony/symfony (Packagist): from 8, fixed in 8.1.12

## Description

### Description

The router redirects a request to the same URL with or without its trailing slash, or with the scheme that a route requires. To do so, the matcher returns `RedirectController::urlRedirectAction()` with the path info of the request as `path`. Since Symfony 5.4.44, 6.4.12 and 7.1.5, `urlRedirectAction()` turns a path that starts with `//` into `<scheme>://...`, so that protocol-relative targets configured in routes work. The path info of a request starts with `//` when its URI does. So these redirects send the browser to the host written at the start of the path:

```
GET https://app.example//evil.example/edit/  =>  301 Location: https://evil.example/edit
```

This affects routes whose path starts with a placeholder that accepts `/`, like `/{path}/edit` with the `.+` requirement. The trailing-slash redirect applies to all of them, and the scheme redirect to the ones that require a scheme. A front controller in a subdirectory doesn't prevent it.

### Resolution

The matcher now encodes the slash or backslash that follows the leading slash of the path it redirects to, as `%2F` or `%5C`. It also does so when tabs or newlines come in between. The target route still matches it, and protocol-relative targets configured in routes keep working.

The matchers of the Routing component encode it too before calling `RedirectableUrlMatcherInterface::redirect()`, so that other implementations of this method get the encoded path as well.

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

### Credits

We would like to thank Yan Buatois for reporting the issue, [Amimul Ihsan](https://github.com/aimahdi) for reporting it independently, and Nicolas Grekas for providing the fix.

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-q2qh-q4p8-qcmj

Page: https://cve.now/GHSA-Q2QH-Q4P8-QCMJ

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