Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

x/vulndb: potential Go vuln in go.pinniped.dev: CVE-2022-31677, GHSA-rp4v-hhm6-rcv9 #981

Closed
tatianab opened this issue Sep 9, 2022 · 3 comments
Assignees
Labels
excluded: NOT_IMPORTABLE This vulnerability only exists in a binary and is not importable.

Comments

@tatianab
Copy link
Contributor

tatianab commented Sep 9, 2022

In GitHub Security Advisory GHSA-rp4v-hhm6-rcv9, there is a vulnerability in the following Go packages or modules:

Unit Fixed Vulnerable Ranges
go.pinniped.dev 0.19.0 >= 0.3.0, < 0.19.0

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

modules:
  - module: TODO
    versions:
      - introduced: 0.3.0
        fixed: 0.19.0
    packages:
      - package: go.pinniped.dev
description: |
    ### Impact

    A user authenticating to Kubernetes clusters via the Pinniped Supervisor could potentially use their access token to continue their session beyond what proper use of their refresh token might allow.

    Access tokens issued by the Pinniped Supervisor have an intended expiration lifetime of approximately two minutes. The Pinniped CLI will automatically use the refresh token, which has a lifetime of approximately nine hours, to request a new access token after the access token's advertised expiration time elapses. Starting in Pinniped version 0.13.0, the Supervisor performs checks during each refresh request against the configured external identity provider to determine if the user should be allowed to continue their session. Thus, the short lifetime of the access token is intended to force users to be subjected to those checks often. For example, if a user's account in the external identity provider became locked, the next refresh would fail, and the user should lose access to the Kubernetes clusters fairly quickly. As another example, if a user's group membership changed in the external identity provider, the new group memberships would be reflected in their sessions with Kubernetes clusters within a fairly short window of time.

    Access tokens are cached in a local file by the Pinniped CLI (the kubectl plugin) and are sent back to the Supervisor (via HTTPS) to receive cluster-scoped credentials. Due to a bug in this token exchange, the expiration time of the submitted access token was not checked correctly, causing expired access tokens to continue to be accepted by this endpoint until the user's backend session data is deleted, approximately nine hours after their session started. This bug could allow a legitimate user to avoid the checks performed during refresh by maliciously skipping the refresh step.

    Note that the Pinniped CLI performs the refresh operation often, so the refresh checks are still performed often under normal usage of the CLI, despite this bug.

    Practical impact to versions before v0.13.0 is minimal, since those versions did not perform checks against the external identity provider during refreshes. In these versions, the user can perform refreshes to get a new access tokens without restriction for approximately nine hours, so the duration of their access is effectively unchanged by this bug.

    ### Patches

    The impacted token exchange feature was first introduced in v0.3.0. Versions v0.3.0 to v0.18.0 are effected by this bug.

    This vulnerability was found by the maintainers of Pinniped and fixed immediately. The fix was introduced in release v0.19.0.

    ### Workarounds

    There are no known workarounds. Upgrading the Supervisor is recommended, especially for users of v0.13.0 or newer.

    ### References

    The issue was fixed by PR [#1264](https://github.com/vmware-tanzu/pinniped/pull/1264).

    ### For more information

    If you have any questions or comments about this advisory, please reach out to the maintainers using one of the methods described in this repo's [README.md](https://github.com/vmware-tanzu/pinniped/blob/main/README.md#discussion).
cves:
  - CVE-2022-31677
ghsas:
  - GHSA-rp4v-hhm6-rcv9

@neild neild added excluded: NOT_IMPORTABLE This vulnerability only exists in a binary and is not importable. and removed NeedsTriage labels Sep 20, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/432158 mentions this issue: data/excluded: add GO-2022-0981.yaml for CVE-2022-31677

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/592774 mentions this issue: data/reports: unexclude 50 reports

@gopherbot
Copy link
Contributor

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

gopherbot pushed a commit that referenced this issue Aug 21, 2024
  - data/reports/GO-2022-0922.yaml
  - data/reports/GO-2022-0923.yaml
  - data/reports/GO-2022-0924.yaml
  - data/reports/GO-2022-0925.yaml
  - data/reports/GO-2022-0928.yaml
  - data/reports/GO-2022-0929.yaml
  - data/reports/GO-2022-0933.yaml
  - data/reports/GO-2022-0936.yaml
  - data/reports/GO-2022-0937.yaml
  - data/reports/GO-2022-0938.yaml
  - data/reports/GO-2022-0939.yaml
  - data/reports/GO-2022-0953.yaml
  - data/reports/GO-2022-0959.yaml
  - data/reports/GO-2022-0960.yaml
  - data/reports/GO-2022-0964.yaml
  - data/reports/GO-2022-0970.yaml
  - data/reports/GO-2022-0971.yaml
  - data/reports/GO-2022-0981.yaml
  - data/reports/GO-2022-0982.yaml
  - data/reports/GO-2022-0983.yaml

Updates #922
Updates #923
Updates #924
Updates #925
Updates #928
Updates #929
Updates #933
Updates #936
Updates #937
Updates #938
Updates #939
Updates #953
Updates #959
Updates #960
Updates #964
Updates #970
Updates #971
Updates #981
Updates #982
Updates #983

Change-Id: I2c7e7a823ba3bf18dab1234a40c08ac4825903f6
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/607229
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Tatiana Bradley <[email protected]>
Commit-Queue: Tatiana Bradley <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
excluded: NOT_IMPORTABLE This vulnerability only exists in a binary and is not importable.
Projects
None yet
Development

No branches or pull requests

3 participants