CVE-2023-29195: Vitess.io/vitess VTAdmin Users That Can Create Vulnerability

MODERATE
Advisory Identifier: GHSA-pqj7-jx24-wj7w
CVSS 4.1
CWE-703 CWE-20
Published
Advisory Summary

CVE-2023-29195 is a MODERATE (CVSS 4.1) vtadmin users that can create vulnerability (CWE-703: Improper Check or Handling of Exceptional Conditions) affecting Vitess.io/vitess libraries in the Go ecosystem. The issue involves vtadmin users that can create shards can deny access to other functions. Remediation is available by upgrading affected packages to version 0.16.2.

CVE-2023-29195 at a Glance

CVE Identifier CVE-2023-29195
GHSA Identifier GHSA-pqj7-jx24-wj7w
Severity MODERATE
CVSS v3.1 Base Score 4.1
CWE Classification CWE-703: Improper Check or Handling of Exceptional Conditions
Affected Product Vitess.io/vitess
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:L).

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

How to Fix CVE-2023-29195

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

vitess.io/vitess fixed: 0.16.2
Upgrade vitess.io/vitess to 0.16.2
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 vitess.io/vitess

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-29195, inspect your project dependencies for Vitess.io/vitess:

inspect dependencies for vitess.io/vitess

Analyze the terminal output to locate any version of Vitess.io/vitess in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.16.2), 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-703: Improper Check or Handling of Exceptional Conditions, where the product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product. In Vitess.io/vitess, 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 Users can either intentionally or inadvertently create a shard containing `/` characters from VTAdmin such that from that point on, anyone who tries to create a new shard from VTAdmin will receive an error. Attempting to view the keyspace(s) will also no longer work. Creating a shard using `vtctldclient` does not have the same problem because the CLI validates the input correctly. ### Patches v16.0.2, corresponding to [0.16.2 on pkg.go.dev](https://pkg.go.dev/vitess.io/vitess@v0.16.2) ### Workarounds - Always use `vtctldclient` to create shards, instead of using VTAdmin - Disable creating shards from VTAdmin using RBAC - Delete the topology record for the offending shard using the client for your topology server. For example, if you created a shard called `a/b` in keyspace `commerce`, and you are running etcd, it can be deleted by doing something like ``` % etcdctl --endpoints "http://${ETCD_SERVER}" del /vitess/global/keyspaces/commerce/shards/a/b/Shard ``` ### References https://github.com/vitessio/vitess/issues/12842 Found during a security audit sponsored by the [CNCF](https://cncf.io) and facilitated by [OSTIF](https://ostif.org).

CVE-2023-29195 Affected Vitess.io/vitess Versions

1 component(s)
Fixed Versions:
0.16.2
Product / Package Ecosystem Affected Versions Fixed Version
vitess.io/vitess
Go
< 0.16.2
0.16.2

References

Frequently Asked Questions

What is CVE-2023-29195?
CVE-2023-29195 is a security vulnerability in Vitess.io/vitess involving VTAdmin users that can create shards can deny access to other functions under CWE-703: Improper Check or Handling of Exceptional Conditions.
Which Vitess.io/vitess versions are affected?
Affected versions include releases prior to 0.16.2 across affected packages: vitess.io/vitess.
What version fixes CVE-2023-29195?
Upgrading to 0.16.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vitess.io/vitess affected?
Yes, vitess.io/vitess is affected in releases prior to 0.16.2. Upgrade your dependency to 0.16.2 or later.
What is the CVSS score of CVE-2023-29195?
CVE-2023-29195 has a CVSS v3.1 base score of 4.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:L.
What CWE is associated with CVE-2023-29195?
CVE-2023-29195 is classified under CWE-703: Improper Check or Handling of Exceptional Conditions (The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.).
How can I check Go dependencies for CVE-2023-29195?
Run the dependency tree command: 'inspect dependencies for vitess.io/vitess'. 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-pqj7-jx24-wj7w",
  "modified" : "2023-05-11T19:40:49Z",
  "published" : "2023-05-11T19:40:49Z",
  "aliases" : [ "CVE-2023-29195" ],
  "summary" : "VTAdmin users that can create shards can deny access to other functions",
  "details" : "### Impact\nUsers can either intentionally or inadvertently create a shard containing `/` characters from VTAdmin such that from that point on, anyone who tries to create a new shard from VTAdmin will receive an error. \nAttempting to view the keyspace(s) will also no longer work.\nCreating a shard using `vtctldclient` does not have the same problem because the CLI validates the input correctly.\n\n### Patches\nv16.0.2, corresponding to [0.16.2 on pkg.go.dev](https://pkg.go.dev/vitess.io/vitess@v0.16.2)\n\n### Workarounds\n- Always use `vtctldclient` to create shards, instead of using VTAdmin\n- Disable creating shards from VTAdmin using RBAC\n- Delete the topology record for the offending shard using the client for your topology server. For example, if you created a shard called `a/b` in keyspace `commerce`, and you are running etcd, it can be deleted by doing something like\n```\n% etcdctl --endpoints \"http://${ETCD_SERVER}\" del /vitess/global/keyspaces/commerce/shards/a/b/Shard\n```\n\n### References\nhttps://github.com/vitessio/vitess/issues/12842\n\nFound during a security audit sponsored by the [CNCF](https://cncf.io) and facilitated by [OSTIF](https://ostif.org).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "vitess.io/vitess"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.16.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vitessio/vitess/security/advisories/GHSA-pqj7-jx24-wj7w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-29195"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vitessio/vitess/issues/12842"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vitessio/vitess/pull/12843"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vitessio/vitess/commit/9dcbd7de3180f47e94f54989fb5c66daea00c920"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vitessio/vitess"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vitessio/vitess/releases/tag/v16.0.2"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vitess.io/vitess@v0.16.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-703" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-11T19:40:49Z",
    "nvd_published_at" : "2023-05-11T20:15:09Z"
  }
}