CVE-2022-23632: Github.com/traefik/traefik/v2 Skip The Router TLS Configuration Vulnerability

HIGH
Advisory Identifier: GHSA-hrhx-6h34-j5hc
CVSS 7.4
CWE-295
Published
Advisory Summary

CVE-2022-23632 is a HIGH (CVSS 7.4) skip the router tls configuration vulnerability (CWE-295: Improper Certificate Validation) affecting Github.com/traefik/traefik/v2 libraries in the Go ecosystem. The issue involves skip the router tls configuration when the host header is an fqdn. Remediation is available by upgrading affected packages to version 2.6.1.

CVE-2022-23632 at a Glance

CVE Identifier CVE-2022-23632
GHSA Identifier GHSA-hrhx-6h34-j5hc
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Github.com/traefik/traefik/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.4

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:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2022-23632

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.

github.com/traefik/traefik/v2 fixed: 2.6.1
Upgrade github.com/traefik/traefik/v2 to 2.6.1
Verify Direct and Transitive Dependencies

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-2022-23632, 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.6.1), 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-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. 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

### Impact People that configure mTLS between Traefik and clients. For a request, the TLS configuration choice can be different than the router choice, which implies the use of a wrong TLS configuration. - When sending a request using FQDN handled by a router configured with a dedicated TLS configuration, the TLS configuration falls back to the default configuration that might not correspond to the configured one. - If the CNAME flattening is enabled, the selected TLS configuration is the SNI one and the routing uses the CNAME value, so this can skip the expected TLS configuration. ### Patches Traefik v2.6.x: https://github.com/traefik/traefik/releases/tag/v2.6.1 ### Workarounds Add the FDQN to the host rule: Example: ```yml whoami: image: traefik/whoami:v1.7.1 labels: traefik.http.routers.whoami.rule: Host(`whoami.example.com`, `whoami.example.com.`) traefik.http.routers.whoami.tls: true traefik.http.routers.whoami.tls.options: mtls@file ``` There is no workaround if the CNAME flattening is enabled. ### For more information If you have any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).

CVE-2022-23632 Affected Github.com/traefik/traefik/v2 Versions

1 component(s)
Fixed Versions:
2.6.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/traefik/traefik/v2
Go
< 2.6.1
2.6.1

References

Frequently Asked Questions

What is CVE-2022-23632?
CVE-2022-23632 is a security vulnerability in Github.com/traefik/traefik/v2 involving Skip the router TLS configuration when the host header is an FQDN under CWE-295: Improper Certificate Validation.
Which Github.com/traefik/traefik/v2 versions are affected?
Affected versions include releases prior to 2.6.1 across affected packages: github.com/traefik/traefik/v2.
What version fixes CVE-2022-23632?
Upgrading to 2.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/traefik/traefik/v2 affected?
Yes, github.com/traefik/traefik/v2 is affected in releases prior to 2.6.1. Upgrade your dependency to 2.6.1 or later.
What is the CVSS score of CVE-2022-23632?
CVE-2022-23632 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2022-23632?
CVE-2022-23632 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check Go dependencies for CVE-2022-23632?
Run the dependency tree command: 'inspect dependencies for github.com/traefik/traefik/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hrhx-6h34-j5hc",
  "modified" : "2022-02-16T22:30:57Z",
  "published" : "2022-02-16T22:30:57Z",
  "aliases" : [ "CVE-2022-23632" ],
  "summary" : "Skip the router TLS configuration when the host header is an FQDN",
  "details" : "### Impact\n\nPeople that configure mTLS between Traefik and clients.\n\nFor a request, the TLS configuration choice can be different than the router choice, which implies the use of a wrong TLS configuration.\n\n- When sending a request using FQDN handled by a router configured with a dedicated TLS configuration, the TLS configuration falls back to the default configuration that might not correspond to the configured one.\n\n- If the CNAME flattening is enabled, the selected TLS configuration is the SNI one and the routing uses the CNAME value, so this can skip the expected TLS configuration.\n\n### Patches\n\nTraefik v2.6.x: https://github.com/traefik/traefik/releases/tag/v2.6.1\n\n### Workarounds\n\nAdd the FDQN to the host rule:\n\nExample:\n\n```yml\n  whoami:\n    image: traefik/whoami:v1.7.1\n    labels:\n      traefik.http.routers.whoami.rule: Host(`whoami.example.com`, `whoami.example.com.`)\n      traefik.http.routers.whoami.tls: true\n      traefik.http.routers.whoami.tls.options: mtls@file\n```\n\nThere is no workaround if the CNAME flattening is enabled.\n\n### For more information\n\nIf you have any questions or comments about this advisory, please [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:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/traefik/traefik/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/security/advisories/GHSA-hrhx-6h34-j5hc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23632"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/pull/8764"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/traefik/traefik"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/releases/tag/v2.6.1"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-02-16T22:30:57Z",
    "nvd_published_at" : "2022-02-17T15:15:00Z"
  }
}