Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

x/vulndb: potential Go vuln in github.com/authzed/spicedb: GHSA-cjr9-mr35-7xh6 #1723

Closed
GoVulnBot opened this issue Apr 13, 2023 · 3 comments
Assignees
Labels
excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module.

Comments

@GoVulnBot
Copy link

In GitHub Security Advisory GHSA-cjr9-mr35-7xh6, there is a vulnerability in the following Go packages or modules:

Unit Fixed Vulnerable Ranges
github.com/authzed/spicedb 1.19.1 < 1.19.1

Cross references:

See doc/triage.md for instructions on how to triage this report.

modules:
  - module: github.com/authzed/spicedb
    versions:
      - fixed: 1.19.1
    packages:
      - package: github.com/authzed/spicedb
summary: SpiceDB binding metrics port to untrusted networks and can leak command-line
    flags
description: |-
    ### Background

    The `spicedb serve` command contains a flag named `--grpc-preshared-key` which is used to protect the gRPC API from being accessed by unauthorized requests. The values of this flag are to be considered sensitive, secret data.

    The `/debug/pprof/cmdline` endpoint served by the metrics service (defaulting running on port `9090`) reveals the command-line flags provided for debugging purposes. If a password is set via the `--grpc-preshared-key` then the key is revealed by this endpoint along with any other flags provided to the SpiceDB binary.

    ### Impact

    All deployments abiding by the recommended best practices for production usage are **NOT affected**:
    - Authzed's SpiceDB Serverless
    - Authzed's SpiceDB Dedicated
    - SpiceDB Operator

    Users configuring SpiceDB via environment variables are **NOT affected**.

    Users **MAY be affected** if they expose their metrics port to an untrusted network and are configuring `--grpc-preshared-key` via command-line flag.

    ### Workarounds

    To workaround this issue you can do one of the following:

    - Configure the preshared key via an environment variable (e.g. `SPICEDB_GRPC_PRESHARED_KEY=yoursecret spicedb serve`)
    - Reconfigure the `--metrics-addr` flag to bind to a trusted network (e.g. `--metrics-addr=localhost:9090`)
    - Disable the metrics service via the flag (e.g. `--metrics-enabled=false`)
    - Adopt one of the recommended deployment models: [Authzed's managed services](https://authzed.com/#) or the [SpiceDB Operator](https://github.com/authzed/spicedb-operator)

    ### References

    - [GitHub Security Advisory issued for SpiceDB](https://github.com/authzed/spicedb/security/advisories/GHSA-cjr9-mr35-7xh6)
    - [Go issue #22085](https://github.com/golang/go/issues/22085) for documenting the risks of exposing pprof to the internet
    - [Go issue #42834](https://github.com/golang/go/issues/42834) discusses preventing pprof registration to the default serve mux
    - [semgrep rule go.lang.security.audit.net.pprof.pprof-debug-exposure](https://semgrep.dev/r?q=go.lang.security.audit.net.pprof) checks for a variation of this issue
cves:
  - CVE-2023-29193
ghsas:
  - GHSA-cjr9-mr35-7xh6
references:
  - advisory: https://github.com/authzed/spicedb/security/advisories/GHSA-cjr9-mr35-7xh6
  - fix: https://github.com/authzed/spicedb/commit/9bbd7d76b6eaba33fe0236014f9b175d21232999
  - advisory: https://github.com/advisories/GHSA-cjr9-mr35-7xh6

@timothy-king timothy-king self-assigned this Apr 17, 2023
@timothy-king timothy-king added the excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module. label Apr 18, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/485916 mentions this issue: data/excluded: batch add GO-2023-1729, GO-2023-1728, GO-2023-1727, GO-2023-1723, GO-2023-1721, GO-2023-1720

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/592760 mentions this issue: data/reports: unexclude 75 reports

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/606785 mentions this issue: data/reports: unexclude 20 reports (5)

gopherbot pushed a commit that referenced this issue Aug 20, 2024
  - data/reports/GO-2023-1700.yaml
  - data/reports/GO-2023-1701.yaml
  - data/reports/GO-2023-1707.yaml
  - data/reports/GO-2023-1708.yaml
  - data/reports/GO-2023-1716.yaml
  - data/reports/GO-2023-1718.yaml
  - data/reports/GO-2023-1719.yaml
  - data/reports/GO-2023-1721.yaml
  - data/reports/GO-2023-1723.yaml
  - data/reports/GO-2023-1730.yaml
  - data/reports/GO-2023-1735.yaml
  - data/reports/GO-2023-1738.yaml
  - data/reports/GO-2023-1747.yaml
  - data/reports/GO-2023-1754.yaml
  - data/reports/GO-2023-1758.yaml
  - data/reports/GO-2023-1761.yaml
  - data/reports/GO-2023-1763.yaml
  - data/reports/GO-2023-1764.yaml
  - data/reports/GO-2023-1768.yaml
  - data/reports/GO-2023-1774.yaml

Updates #1700
Updates #1701
Updates #1707
Updates #1708
Updates #1716
Updates #1718
Updates #1719
Updates #1721
Updates #1723
Updates #1730
Updates #1735
Updates #1738
Updates #1747
Updates #1754
Updates #1758
Updates #1761
Updates #1763
Updates #1764
Updates #1768
Updates #1774

Change-Id: I3fc567427d68e095cc62ea48dc9b284b2414a372
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/606785
Auto-Submit: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module.
Projects
None yet
Development

No branches or pull requests

3 participants