GHSA-h8g9-6gvh-5mrc: Go.etcd.io/etcd/v3 Etcd Vulnerable To TOCTOU Of Vulnerability

LOW
CWE-367
Published
Advisory Summary

GHSA-h8g9-6gvh-5mrc is a LOW etcd vulnerable to toctou of vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Go.etcd.io/etcd/v3 libraries in the Go ecosystem. The issue involves etcd vulnerable to toctou of gateway endpoint authentication. Remediation is available by upgrading affected packages to version 3.4.10, 3.3.23.

GHSA-h8g9-6gvh-5mrc at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-h8g9-6gvh-5mrc
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Go.etcd.io/etcd/v3
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-h8g9-6gvh-5mrc

To remediate this vulnerability, upgrade all affected Go.etcd.io/etcd/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

go.etcd.io/etcd/v3 fixed: 3.4.10
Upgrade go.etcd.io/etcd/v3 to 3.4.10
go.etcd.io/etcd/v3 fixed: 3.3.23
Upgrade go.etcd.io/etcd/v3 to 3.3.23
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 go.etcd.io/etcd/v3

How to Check if You Are Affected

To determine whether your application is affected by GHSA-h8g9-6gvh-5mrc, inspect your project dependencies for Go.etcd.io/etcd/v3:

inspect dependencies for go.etcd.io/etcd/v3

Analyze the terminal output to locate any version of Go.etcd.io/etcd/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.4.10), 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-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Go.etcd.io/etcd/v3, 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

### Vulnerability type Authentication ### Workarounds Refer to the [gateway documentation](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/gateway.md). The vulnerability was spotted due to unclear documentation of how the gateway handles endpoints validation. ### Detail The gateway only authenticates endpoints detected from DNS SRV records, and it only authenticates the detected endpoints once. Therefore, if an endpoint changes its authentication settings, the gateway will continue to assume the endpoint is still authenticated. The auditors has noted that appropriate documentation of this validation functionality plus deprecation of this misleading functionality is an acceptable path forward. ### References Find out more on this vulnerability in the [security audit report](https://github.com/etcd-io/etcd/blob/master/security/SECURITY_AUDIT.pdf) ### For more information If you have any questions or comments about this advisory: * Contact the [etcd security committee](https://github.com/etcd-io/etcd/blob/master/security/security-release-process.md#product-security-committee-psc)

GHSA-h8g9-6gvh-5mrc Affected Go.etcd.io/etcd/v3 Versions

2 component(s)
Fixed Versions:
3.4.103.3.23
Product / Package Ecosystem Affected Versions Fixed Version
go.etcd.io/etcd/v3
Go
≥ 3.4.0
< 3.4.10
3.4.10
go.etcd.io/etcd/v3
Go
< 3.3.23
3.3.23

References

Frequently Asked Questions

What is GHSA-h8g9-6gvh-5mrc?
GHSA-h8g9-6gvh-5mrc is a security vulnerability in Go.etcd.io/etcd/v3 involving etcd vulnerable to TOCTOU of gateway endpoint authentication under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Go.etcd.io/etcd/v3 versions are affected?
Affected versions include releases prior to 3.4.10, 3.3.23 across affected packages: go.etcd.io/etcd/v3.
What version fixes GHSA-h8g9-6gvh-5mrc?
Upgrading to 3.4.10, 3.3.23 (or the latest patched release for your respective branch) resolves the vulnerability.
Is go.etcd.io/etcd/v3 affected?
Yes, go.etcd.io/etcd/v3 is affected in releases prior to 3.4.10, 3.3.23. Upgrade your dependency to 3.4.10, 3.3.23 or later.
What CWE is associated with GHSA-h8g9-6gvh-5mrc?
GHSA-h8g9-6gvh-5mrc is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check Go dependencies for GHSA-h8g9-6gvh-5mrc?
Run the dependency tree command: 'inspect dependencies for go.etcd.io/etcd/v3'. 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-h8g9-6gvh-5mrc",
  "modified" : "2022-10-06T23:12:38Z",
  "published" : "2022-10-06T23:12:38Z",
  "aliases" : [ ],
  "summary" : "etcd vulnerable to TOCTOU of gateway endpoint authentication",
  "details" : "### Vulnerability type\nAuthentication\n\n### Workarounds\nRefer to the [gateway documentation](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/gateway.md). The vulnerability was spotted due to unclear documentation of how the gateway handles endpoints validation. \n\n### Detail\nThe gateway only authenticates endpoints detected from DNS SRV records, and it only authenticates the detected endpoints once. Therefore, if an endpoint changes its authentication settings, the gateway will continue to assume the endpoint is still authenticated. The auditors has noted that appropriate documentation of this validation functionality plus deprecation of this misleading functionality is an acceptable path forward.\n\n### References\nFind out more on this vulnerability in the [security audit report](https://github.com/etcd-io/etcd/blob/master/security/SECURITY_AUDIT.pdf)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Contact the [etcd security committee](https://github.com/etcd-io/etcd/blob/master/security/security-release-process.md#product-security-committee-psc)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "go.etcd.io/etcd/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.0"
      }, {
        "fixed" : "3.4.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "go.etcd.io/etcd/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.23"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/etcd-io/etcd/security/advisories/GHSA-h8g9-6gvh-5mrc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/etcd-io/etcd"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-367" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-06T23:12:38Z",
    "nvd_published_at" : null
  }
}