CVE-2021-32813: Github.com/traefik/traefik/v2 Header Dropping Vulnerability
MODERATECVE-2021-32813 is a MODERATE (CVSS 4.8) header dropping vulnerability (CWE-913: Improper Control of Dynamically-Managed Code Resources) affecting Github.com/traefik/traefik/v2 libraries in the Go ecosystem. The issue involves header dropping in traefik. Remediation is available by upgrading affected packages to version 2.4.13.
CVE-2021-32813 at a Glance
Security Impact
CVSS: 4.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2021-32813
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.4.13
Upgrade github.com/traefik/traefik to Latest secure release
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-2021-32813, 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.4.13), 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-913: Improper Control of Dynamically-Managed Code Resources, where the product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements. 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-2021-32813 Affected Github.com/traefik/traefik/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/traefik/traefik/v2
|
Go |
< 2.4.13
|
2.4.13
|
|
github.com/traefik/traefik
|
Go |
≤ 1.7.30
|
|
References
Frequently Asked Questions
What is CVE-2021-32813?
Which Github.com/traefik/traefik/v2 versions are affected?
What version fixes CVE-2021-32813?
Is github.com/traefik/traefik/v2 affected?
Is github.com/traefik/traefik affected?
What is the CVSS score of CVE-2021-32813?
What CWE is associated with CVE-2021-32813?
How can I check Go dependencies for CVE-2021-32813?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m697-4v8f-55qg",
"modified" : "2021-08-31T20:57:09Z",
"published" : "2021-08-05T17:04:21Z",
"aliases" : [ "CVE-2021-32813" ],
"summary" : "Header dropping in traefik",
"details" : "# Impact\n\nThere exists a potential header vulnerability in Traefik's handling of the Connection header. Active exploitation of this issue is unlikely, as it requires that a removed header would lead to a privilege escalation, however, the Traefik team has addressed this issue to prevent any potential abuse.\n\n# Details\n\nIf you have a chain of Traefik middlewares, and one of them sets a request header `Important-Security-Header`, then sending a request with the following Connection header will cause it to be removed before the request was sent:\n\n```\ncurl 'https://example.com' -H \"Connection: Important-Security-Header\" -0\n```\n\nIn this case, the backend does not see the request header `Important-Security-Header`.\n\n# Patches\n\nTraefik v2.4.x: https://github.com/traefik/traefik/releases/tag/v2.4.13\n\n# Workarounds\n\nNo.\n\n# For more information\n\nIf you have any questions or comments about this advisory, [open an issue](https://github.com/traefik/traefik/issues).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/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.4.13"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/traefik/traefik"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.7.30"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/security/advisories/GHSA-m697-4v8f-55qg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32813"
}, {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/pull/8319/commits/cbaf86a93014a969b8accf39301932c17d0d73f9"
}, {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/releases/tag/v2.4.13"
}, {
"type" : "PACKAGE",
"url" : "github.com/traefik/traefik"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-913" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-04T18:54:19Z",
"nvd_published_at" : "2021-08-03T23:15:00Z"
}
}