golang / vulndb

[mirror] The Go Vulnerability Database
Other
560 stars 58 forks source link

x/vulndb: potential Go vuln in sigs.k8s.io/secrets-store-csi-driver: GHSA-g82w-58jf-gcxx #1793

Closed GoVulnBot closed 1 year ago

GoVulnBot commented 1 year ago

In GitHub Security Advisory GHSA-g82w-58jf-gcxx, there is a vulnerability in the following Go packages or modules:

Unit Fixed Vulnerable Ranges
sigs.k8s.io/secrets-store-csi-driver 1.3.3 < 1.3.3

Cross references:

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

modules:
  - module: sigs.k8s.io/secrets-store-csi-driver
    versions:
      - fixed: 1.3.3
    packages:
      - package: sigs.k8s.io/secrets-store-csi-driver
summary: secrets-store-csi-driver discloses service account tokens in logs
description: |-
    A security issue was discovered in secrets-store-csi-driver where an actor with access to the driver logs could observe service account tokens.  These tokens could then potentially be exchanged with external cloud providers to access secrets stored in cloud vault solutions.  Tokens are only logged when [TokenRequests is configured in the CSIDriver object](https://kubernetes-csi.github.io/docs/token-requests.html) and the driver is set to run at log level 2 or greater via the -v flag.

    This issue has been rated MEDIUM [CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N) (6.5), and assigned CVE-2023-2878

    ### Am I vulnerable?

    You may be vulnerable if [TokenRequests is configured in the CSIDriver object](https://kubernetes-csi.github.io/docs/token-requests.html) and the driver is set to run at log level 2 or greater via the -v flag.

    To check if token requests are configured, run the following command:

    ```bash
    kubectl get csidriver secrets-store.csi.k8s.io -o jsonpath="{.spec.tokenRequests}"
To check if tokens are being logged, examine the secrets-store container log:

```bash
kubectl logs -l app=secrets-store-csi-driver -c secrets-store -f | grep --line-buffered "csi.storage.k8s.io/serviceAccount.tokens"
```

### Affected Versions

- secrets-store-csi-driver < 1.3.3

### How do I mitigate this vulnerability?

Prior to upgrading, this vulnerability can be mitigated by running secrets-store-csi-driver at log level 0 or 1 via the -v flag.

### Fixed Versions

- secrets-store-csi-driver >= 1.3.3

To upgrade, refer to the documentation: https://secrets-store-csi-driver.sigs.k8s.io/getting-started/upgrades.html#upgrades

### Detection

Examine cloud provider logs for unexpected token exchanges, as well as unexpected access to cloud vault secrets.

If you find evidence that this vulnerability has been exploited, please contact [security@kubernetes.io](https://groups.google.com/)

### Acknowledgements

This vulnerability was reported by Tomer Shaiman @tshaiman from Microsoft.

cves:

tatianab commented 1 year ago

fix: https://github.com/kubernetes-sigs/secrets-store-csi-driver/commit/dcb2c294be3bc8b792e02b9f03e5078664db0581

gopherbot commented 1 year ago

Change https://go.dev/cl/503837 mentions this issue: data/excluded: batch add 21 excluded reports

gopherbot commented 3 months ago

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

gopherbot commented 1 month ago

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