CVE-2023-47106
JSON

4.8medium

Incorrect processing of fragment in the URL leads to Authorization Bypass in Traefik

Severity
4.8medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.76% (higher than 56% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-fvhj-4qfh-q2hmGO-2023-2376

Description

Traefik is an open source HTTP reverse proxy and load balancer. When a request is sent to Traefik with a URL fragment, Traefik automatically URL encodes and forwards the fragment to the backend server. This violates RFC 7230 because in the origin-form the URL should only contain the absolute path and the query. When this is combined with another frontend proxy like Nginx, it can be used to bypass frontend proxy URI-based access control restrictions. This vulnerability has been addressed in versions 2.10.6 and 3.0.0-beta5. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Affected

Product or packageVersionsReported by
traefik traefik< 2.10.6, >= 3.0.0-beta1, < 3.0.0-beta5, up to 2.10.5, 3.0.0CVE List, NVD
github.com/traefik/traefik/v2 (Go)before 2.10.6GitHub Advisory Database, Go Vulnerability Database
github.com/traefik/traefik/v3 (Go)before 3.0.0-beta5GitHub Advisory Database, Go Vulnerability Database
github.com/traefik/traefik (Go)all versionsGo Vulnerability Database

All scores

GitHub_M4.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Classification

What each source says

CVE List

Traefik is an open source HTTP reverse proxy and load balancer. When a request is sent to Traefik with a URL fragment, Traefik automatically URL encodes and forwards the fragment to the backend server. This violates RFC 7230 because in the origin-form the URL should only contain the absolute path and the query. When this is combined with another frontend proxy like Nginx, it can be used to bypass frontend proxy URI-based access control restrictions. This vulnerability has been addressed in versions 2.10.6 and 3.0.0-beta5. Users are advised to upgrade. There are no known workarounds for this vulnerability.

GitHub Advisory Database
Summary

When a request is sent to Traefik with a URL fragment, Traefik automatically URL encodes and forwards the fragment to the backend server. This violates the RFC because in the origin-form the URL should only contain the absolute path and the query.

When this is combined with another frontend proxy like Nginx, it can be used to bypass frontend proxy URI-based access control restrictions.

Details

For example, we have this Nginx configuration:

location /admin {
     deny all;
     return 403;
}

This can be bypassed when the attacker is requesting to /#/../admin

This won’t be vulnerable if the backend server follows the RFC and ignores any characters after the fragment.

However, if Nginx is chained with another reverse proxy which automatically URL encode the character # (Traefik) the URL will become

/%23/../admin

And allow the attacker to completely bypass the Access Restriction from the Nginx Front-End proxy.

Here is a diagram to summarize the attack:

image

PoC

image (1)

This is the POC docker I've set up. It contains Nginx, Traefik proxies and a backend server running PHP.

https://drive.google.com/file/d/1vLnA0g7N7ZKhLNmHmuJ4JJjV_J2akNMt/view?usp=sharing

Impact

This allows the attacker to completely bypass the Access Restriction from Front-End proxy.

Go Vulnerability Database

Traefik incorrectly processes fragment in the URL, leads to Authorization Bypass in github.com/traefik/traefik

NVD (es)

Traefik es un equilibrador de carga y proxy inverso HTTP de código abierto. Cuando se envía una solicitud a Traefik con un fragmento de URL, Traefik codifica automáticamente la URL y reenvía el fragmento al servidor backend. Esto viola RFC 7230 porque en el formulario de origen la URL solo debe contener la ruta absoluta y la consulta. Cuando esto se combina con otro proxy de interfaz como Nginx, se puede utilizar para evitar las restricciones de control de acceso basadas en URI del proxy de interfaz. Esta vulnerabilidad se ha solucionado en las versiones 2.10.6 y 3.0.0-beta5. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-47106 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-fvhj-4qfh-q2hm changed 2026-08-07CC-BY-4.0
Go Vulnerability DatabaseGO-2023-2376 changed 2026-08-07CC-BY-4.0
NVDCVE-2023-47106 changed 2026-06-17Public domain