fix(deps): update module github.com/traefik/traefik/v2 to v2.11.9 [security] #124
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.
This PR contains the following updates:
v2.6.6
->v2.11.9
GitHub Vulnerability Alerts
CVE-2022-39271
Impact
There is a potential vulnerability in Traefik managing HTTP/2 connections.
A closing HTTP/2 server connection could hang forever because of a subsequent fatal error. This failure mode could be exploited to cause a denial of service.
Patches
Traefik v2.8.x: https://github.com/traefik/traefik/releases/tag/v2.8.8
Traefik v2.9.x: https://github.com/traefik/traefik/releases/tag/v2.9.0-rc5
Workarounds
No workaround.
For more information
If you have any questions or comments about this advisory, please open an issue.
CVE-2022-46153
Impact
There is a potential vulnerability in Traefik managing the TLS connections.
A router configured with a not well-formatted TLSOption is exposed with an empty TLSOption.
For instance, a route secured using an mTLS connection set with a wrong CA file is exposed without verifying the client certificates.
Patches
https://github.com/traefik/traefik/releases/tag/v2.9.6
Workarounds
Check the logs to detect the following error messages and fix your TLS options:
For more information
If you have any questions or comments about this advisory, please open an issue.
CVE-2022-23469
Impact
There is a potential vulnerability in Traefik displaying the Authorization header in its debug logs.
Traefik uses oxy to provide the following features:
In such cases, if the log level is set to DEBUG, the credentials provided using the Authorization header are displayed in the debug logs:
Patches
https://github.com/traefik/traefik/pull/9574
https://github.com/traefik/traefik/releases/tag/v2.9.6
Workarounds
Set the log level to
INFO
,WARN
, orERROR
.For more information
If you have any questions or comments about this advisory, please open an issue.
CVE-2023-29013
Impact
There is a vulnerability in Go when parsing the HTTP headers, which impacts Traefik.
HTTP header parsing could allocate substantially more memory than required to hold the parsed headers. This behavior could be exploited to cause a denial of service.
References
Patches
Workarounds
No workaround.
For more information
If you have any questions or comments about this advisory, please open an issue.
CVE-2023-47106
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:
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:
PoC
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.
CVE-2023-47124
Impact
There is a potential vulnerability in Traefik managing the ACME HTTP challenge.
When Traefik is configured to use the HTTPChallenge to generate and renew the Let's Encrypt TLS certificates, the delay authorized to solve the challenge (50 seconds) can be exploited by attackers (slowloris attack).
Patches
Workarounds
Replace the HTTPChallenge with the TLSChallenge or the DNSChallenge.
For more information
If you have any questions or comments about this advisory, please open an issue.
CVE-2023-47633
Summary
The traefik docker container uses 100% CPU when it serves as its own backend, which is an automatically generated route resulting from the Docker integration in the default configuration.
Details
While attempting to set up Traefik to handle traffic for Docker containers, I observed in the webUI a rule with the following information:
Host(traefik-service) | webwebsecure | traefik-service@docker | traefik-service
I assumed that this is something internal; however, I wondered why it would have a host rule on the web entrypoint configured.
So I have send a request with that hostname with
curl -v --resolve "traefik-service:80:xxx.xxx.xxx.xxx" http://traefik-service
. That made my whole server unresponsive.I assume the name comes from a docker container with that name, traefik itself:
PoC
Start traefik with
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -p 80:80 --name foo -p 8080:8080 traefik:v2.10 --api.insecure=true --providers.docker
curl -v --resolve "foo:80:127.0.0.1" http://foo
looks like this creates an endless loop of request.
Knowing the name of the docker container seems to be enough to trigger this, if the docker backend is used.
Impact
Server is unreachable and uses 100% CPU
CVE-2024-28869
There is a potential vulnerability in Traefik managing requests with
Content-length
and nobody
.Sending a
GET
request to any Traefik endpoint with theContent-length
request header results in an indefinite hang with the default configuration. This vulnerability can be exploited by attackers to induce a denial of service.Patches
Workarounds
For affected versions, this vulnerability can be mitigated by configuring the readTimeout option.
For more information
If you have any questions or comments about this advisory, please open an issue.
GHSA-7f4j-64p6-5h5v
There is a potential vulnerability in Traefik managing HTTP/2 connections.
More details in the CVE-2023-45288.
Patches
Workarounds
No workaround
For more information
If you have any questions or comments about this advisory, please open an issue.
GHSA-f7cq-5v43-8pwp
Impact
There is a vulnerability in GO managing malformed DNS message, which impacts Traefik.
This vulnerability could be exploited to cause a denial of service.
References
Patches
Workarounds
No workaround.
For more information
If you have any questions or comments about this advisory, please open an issue.
GHSA-7jmw-8259-q9jx
Impact
There is a vulnerability in Go managing various Is methods (IsPrivate, IsLoopback, etc) for IPv4-mapped IPv6 addresses.
They didn't work as expected returning false for addresses which would return true in their traditional IPv4 forms.
References
Patches
Workarounds
No workaround.
For more information
If you have any questions or comments about this advisory, please open an issue.
GHSA-rvj4-q8q5-8grf
Impact
There is a vulnerability in Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability.
References
Patches
Workarounds
No workaround.
For more information
If you have any questions or comments about this advisory, please open an issue.
CVE-2024-39321
Impact
There is a vulnerability in Traefik that allows bypassing IP allow-lists via HTTP/3 early data requests in QUIC 0-RTT handshakes sent with spoofed IP addresses.
Patches
Workarounds
No workaround.
For more information
If you have any questions or comments about this advisory, please open an issue.
Original Description
Summary
Bypassing IP allow-lists in traefik via HTTP/3 early data requests in QUIC 0-RTT handshakes sent with spoofed IP addresses.
Details
HTTP/3 supports sending HTTP requests as early data during QUIC 0-RTT handshakes to reduce RTT overhead for connection resumptions. Early data is sent and received before the handshake is completed and the client's IP address is validated.
The initial packet containing the QUIC 0-RTT handshake information and the early data HTTP request are sent as a single UDP datagram. Due to UDP being used by QUIC, the source IP address can be spoofed. When HTTP/3 servers process early data requests, the application layer only sees the unvalidated - possibly spoofed - IP address.
First, attackers have to obtain a session ticket from the HTTP/3 server. For that, attackers have to establish an HTTP/3 connection to the server - using their real IP address - and wait for the server to send a session ticket. Note that attackers do not have to send an actual HTTP request over the established connection. After obtaining the session ticket, the attacker can close the connection. In the second step, attackers need to prepare a UDP datagram containing a QUIC initial packet with a TLS ClientHello and the session ticket, a QUIC 0-RTT packet with early data encrypted with the pre-shared key from the session ticket, and an HTTP/3 request (open request stream, HEADERS frame, optionally DATA frame). This prepared UDP datagram can then be sent to the server with an arbitrarily spoofed source IP address in the IP packet header. When processing the HTTP request, the server trusts the spoofed IP address, which can be used to bypass IP-allow/block-lists.
A prerequisite for this attack to succeed is that HTTP/3 servers have implemented and enabled 0-RTT early data for HTTP/3 requests (and no mitigations are in place). A caveat is that attackers are not able to receive the server's response because the response is sent to the spoofed source IP address, making it a blind attack. Another limitation is that the request has to fit in a single UDP datagram, whose size is limited by the network path's MTU (minus some bytes for headers of encapsulating protocols such as HTTP/3, QUIC, UDP, IPv4/IPv6).
Impact
IP allow-lists can be bypassed. Early data in QUIC 0-RTT handshakes is enabled when HTTP/3 support is enabled.
Mitigation
ipAllowList.sourceRange
middleware. See RFC 8470 Section 3 for more information.ipAllowList.sourceRange
middleware.Additionally, it is recommended to implement RFC 8470 and set the
Early-Data: 1
header when forwarding early data requests to backend services. Currently, applications are not able to distinguish between 0-RTT early data requests and regular requests. When applications use the client's IP inX-Forwarded-For
headers (e.g. for rate limiting), they are not able to detect potential IP spoofing on the application layer.Proof of Concept
Traefik is used as a HTTP/3 reverse proxy for a backend application. An IP allow list is configured to only allow access from the IP address 1.3.3.7.
By performing the steps described above, attackers are able to bypass the IP allow list and send requests to the backend application. The security impact depends on the application's logic.
Please find attached a proof-of-concept docker-compose setup to demonstrate the vulnerability. It consists of a traefik reverse proxy, a backend application, and an attacker container. The attack script performs following request:
Note: We use a custom python script because,
curl
does not support QUIC 0-RTT requests and session resumtion yet.proof-of-concept.zip
Here are logs of a successful exploitation in the attached docker compose setup:
CVE-2024-45410
Impact
There is a vulnerability in Traefik that allows the client to remove the X-Forwarded headers (except the header X-Forwarded-For).
Patches
Workarounds
No workaround.
For more information
If you have any questions or comments about this advisory, please open an issue.
Original Description
Summary
When a HTTP request is processed by Traefik, certain HTTP headers such as X-Forwarded-Host or X-Forwarded-Port are added by Traefik before the request is routed to the application. For a HTTP client, it should not be possible to remove or modify these headers. Since the application trusts the value of these headers, security implications might arise, if they can be modified.
For HTTP/1.1, however, it was found that some of theses custom headers can indeed be removed and in certain cases manipulated. The attack relies on the HTTP/1.1 behavior, that headers can be defined as hop-by-hop via the HTTP Connection header. By setting the following connection header, the X-Forwarded-Host header can, for example, be removed:
Connection: close, X-Forwarded-Host
Depending on how the receiving application handles such cases, security implications may arise. Moreover, some application frameworks (e.g. Django) first transform the "-" to "_" signs, making it possible for the HTTP client to even modify these headers in these cases.
This is similar to CVE-2022-31813 for Apache HTTP Server.
Details
It was found that the following headers can be removed in this way (i.e. by specifing them within a connection header):
PoC
The following docker-compose file has been used for a simple setup:
The following traefik.yaml has been used:
The Python container just includes a simple Python HTTP server that prints the HTTP headers it receives. Here is the Dockerfile for the container:
And here is the Python script:
The environment is run with
sudo docker-compose up
.A normal HTTP request/response pair looks like this:
Request 1
Response 1
The custom headers added by Traefik can be seen in the response.
Next, a request, where the X-Forwarded-Host header is defined as a hop-by-hop header via the Connection header is sent:
Request 2
Response 2
As can be seen from the response, the X-Forwarded-Host header that had been added by Traefik has been removed from the request.
Moreover, the next request/response pair demonstrates that a custom header with underscore instead of hyphen can be added:
Request 3
Response 3
Some backend frameworks (e.g. Django) handle X-Forwarded-Host and X_forwarded_host in the same way. As there is no X-Forwarded-Host header present in the request, the X_forwarded_host header will be used.
It should be noted that when X-Forwarded-Host is present and a X_forwarded_host header is sent, usually the first occurence of the header will be used, which is in this case X-Forwarded-Host.
It should be noted that the headers X-Forwarded-Tls-Client-Cert and X-Forwarded-Tls-Client-Cert-Info are also affected. Here, client certificate authentication would need to be enabled in the Traefik setup.
Impact
All applications that trust the custom headers set by Traefik are affected by this vulnerability. As an example, assume that a backend application trusts Traefik to validate client certificates and trusts therefore the values that are sent within the X-Forwarded-Tls-Client-Cert header, but does not validate the certificate anew.
If the header is removed via the vulnerability, and the application framework allows for alternative names (e.g. by transforming the headers to lower case, and "-" to "_"), an attacker can place his own X_Forwarded_TLS_Client_Cert header in the request. This could lead to privilege escalation, as the attacker may put an (invalid) certificate in this header that would just be accepted by the application, but may contain other data than the certificate that is presented to Traefik for Client Certificate Authentication.
Moreover, if the backend application uses any of the other custom headers for security-sensitive operations, the removal or modification of these headers may also security implications (e.g. access control bypass).
The severity is the same as for CVE-2022-31813 for Apache HTTP Server, i.e. 9.8 Critical.
Release Notes
traefik/traefik (github.com/traefik/traefik/v2)
v2.11.9
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.8
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.7
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.6
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.5
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.4
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.3
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.2
Compare Source
All Commits
Bug fixes:
v2.11.1
Compare Source
All Commits
Bug fixes:
Documentation:
v2.11.0
Compare Source
All Commits
Enhancements:
Bug fixes:
Documentation:
v2.10.7
Compare Source
All Commits
Bug fixes:
v2.10.6
Compare Source
All Commits
Bug fixes:
Documentation:
v2.10.5
[Compare S
Configuration
📅 Schedule: Branch creation - "" in timezone Europe/London, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.