CVE-2023-47106: Github.com/traefik/traefik/v2 Traefik Incorrectly Processes Fragment Vulnerability
MODERATECVE-2023-47106 is a MODERATE (CVSS 6.5) traefik incorrectly processes fragment vulnerability (CWE-20: Improper Input Validation) affecting Github.com/traefik/traefik/v2 libraries in the Go ecosystem. The issue involves traefik incorrectly processes fragment in the url, leads to authorization bypass. Remediation is available by upgrading affected packages to version 2.10.6, 3.0.0-beta5.
CVE-2023-47106 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2023-47106
To remediate this vulnerability, upgrade all affected Github.com/traefik/traefik/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/traefik/traefik/v2 to 2.10.6
Upgrade github.com/traefik/traefik/v3 to 3.0.0-beta5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/traefik/traefik/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-47106, inspect your project dependencies for Github.com/traefik/traefik/v2:
inspect dependencies for github.com/traefik/traefik/v2
Analyze the terminal output to locate any version of Github.com/traefik/traefik/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/traefik/traefik/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-47106 Affected Github.com/traefik/traefik/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/traefik/traefik/v2
|
Go |
< 2.10.6
|
2.10.6
|
|
github.com/traefik/traefik/v3
|
Go |
< 3.0.0-beta5
|
3.0.0-beta5
|
References
Frequently Asked Questions
What is CVE-2023-47106?
Which Github.com/traefik/traefik/v2 versions are affected?
What version fixes CVE-2023-47106?
Is github.com/traefik/traefik/v2 affected?
Is github.com/traefik/traefik/v3 affected?
What is the CVSS score of CVE-2023-47106?
What CWE is associated with CVE-2023-47106?
How can I check Go dependencies for CVE-2023-47106?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fvhj-4qfh-q2hm",
"modified" : "2023-12-07T23:06:09Z",
"published" : "2023-12-05T18:11:48Z",
"aliases" : [ "CVE-2023-47106" ],
"summary" : "Traefik incorrectly processes fragment in the URL, leads to Authorization Bypass",
"details" : "### Summary\nWhen 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.\n\nWhen this is combined with another frontend proxy like Nginx, it can be used to bypass frontend proxy URI-based access control\nrestrictions. \n\n### Details\nFor example, we have this Nginx configuration:\n\n```\nlocation /admin {\n deny all;\n return 403;\n}\n```\nThis can be bypassed when the attacker is requesting to /#/../admin\n\nThis won’t be vulnerable if the backend server follows the RFC and ignores any characters after the fragment.\n\nHowever, if Nginx is chained with another reverse proxy which automatically URL encode the character # (Traefik) the URL will become\n\n/%23/../admin\n\nAnd allow the attacker to completely bypass the Access Restriction from the Nginx Front-End proxy.\n\nHere is a diagram to summarize the attack:\n\n\n\n### PoC\n\n\nThis is the POC docker I've set up. It contains Nginx, Traefik proxies and a backend server running PHP.\n\nhttps://drive.google.com/file/d/1vLnA0g7N7ZKhLNmHmuJ4JJjV_J2akNMt/view?usp=sharing\n\n### Impact\nThis allows the attacker to completely bypass the Access Restriction from Front-End proxy.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/traefik/traefik/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/traefik/traefik/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.0-beta5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/security/advisories/GHSA-fvhj-4qfh-q2hm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-47106"
}, {
"type" : "WEB",
"url" : "https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/traefik/traefik"
}, {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/releases/tag/v2.10.6"
}, {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/releases/tag/v3.0.0-beta5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-177", "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-05T18:11:48Z",
"nvd_published_at" : "2023-12-04T21:15:33Z"
}
}