Vulnerabilities in pkg:golang/sigs.k8s.io/secrets-store-csi-driver

PACKAGE
Advisory Identifier: GHSA-g82w-58jf-gcxx
Advisory Summary

CVE-2023-2878 is a MODERATE (CVSS 6.5) secrets-store-csi-driver discloses service account tokens vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Sigs.k8s.io/secrets store csi driver libraries in the Go ecosystem. The issue involves secrets-store-csi-driver discloses service account tokens in logs. Remediation is available by upgrading affected packages to version 1.3.3.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/sigs.k8s.io/secrets-store-csi-driver

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/sigs.k8s.io/secrets-store-csi-driver. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g82w-58jf-gcxx CVE-2023-2878 MODERATE secrets-store-csi-driver discloses service account tokens in logs
GHSA-5cgx-vhfp-6cf9 CVE-2020-8568 MODERATE Directory traversal in Kubernetes Secrets Store CSI Driver

CVE-2023-2878 at a Glance

CVE Identifier CVE-2023-2878
GHSA Identifier GHSA-g82w-58jf-gcxx
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Sigs.k8s.io/secrets store csi driver
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2023-2878

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

sigs.k8s.io/secrets-store-csi-driver fixed: 1.3.3
Upgrade sigs.k8s.io/secrets-store-csi-driver to 1.3.3
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 sigs.k8s.io/secrets-store-csi-driver

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-2878, inspect your project dependencies for Sigs.k8s.io/secrets store csi driver:

inspect dependencies for sigs.k8s.io/secrets-store-csi-driver

Analyze the terminal output to locate any version of Sigs.k8s.io/secrets store csi driver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.3), 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-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Sigs.k8s.io/secrets store csi driver, 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

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/)

CVE-2023-2878 Affected Sigs.k8s.io/secrets store csi driver Versions

1 component(s)
Fixed Versions:
1.3.3
Product / Package Ecosystem Affected Versions Fixed Version
sigs.k8s.io/secrets-store-csi-driver
Go
< 1.3.3
1.3.3

References

Frequently Asked Questions

What is CVE-2023-2878?
CVE-2023-2878 is a security vulnerability in Sigs.k8s.io/secrets store csi driver involving secrets-store-csi-driver discloses service account tokens in logs under CWE-532: Insertion of Sensitive Information into Log File.
Which Sigs.k8s.io/secrets store csi driver versions are affected?
Affected versions include releases prior to 1.3.3 across affected packages: sigs.k8s.io/secrets-store-csi-driver.
What version fixes CVE-2023-2878?
Upgrading to 1.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sigs.k8s.io/secrets-store-csi-driver affected?
Yes, sigs.k8s.io/secrets-store-csi-driver is affected in releases prior to 1.3.3. Upgrade your dependency to 1.3.3 or later.
What is the CVSS score of CVE-2023-2878?
CVE-2023-2878 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2023-2878?
CVE-2023-2878 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check Go dependencies for CVE-2023-2878?
Run the dependency tree command: 'inspect dependencies for sigs.k8s.io/secrets-store-csi-driver'. 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-g82w-58jf-gcxx",
  "modified" : "2025-02-13T18:57:13Z",
  "published" : "2023-05-26T13:59:19Z",
  "aliases" : [ "CVE-2023-2878" ],
  "summary" : "secrets-store-csi-driver discloses service account tokens in logs",
  "details" : "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.\n\n\nThis 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\n\n\n### Am I vulnerable?\n\nYou 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.\n\n\nTo check if token requests are configured, run the following command:\n\n```bash\nkubectl get csidriver secrets-store.csi.k8s.io -o jsonpath=\"{.spec.tokenRequests}\"\n```\n\nTo check if tokens are being logged, examine the secrets-store container log:\n\n```bash\nkubectl logs -l app=secrets-store-csi-driver -c secrets-store -f | grep --line-buffered \"csi.storage.k8s.io/serviceAccount.tokens\"\n```\n\n### Affected Versions\n\n- secrets-store-csi-driver < 1.3.3\n\n\n### How do I mitigate this vulnerability?\n\nPrior to upgrading, this vulnerability can be mitigated by running secrets-store-csi-driver at log level 0 or 1 via the -v flag.\n\n\n### Fixed Versions\n\n\n- secrets-store-csi-driver >= 1.3.3\n\n\nTo upgrade, refer to the documentation: https://secrets-store-csi-driver.sigs.k8s.io/getting-started/upgrades.html#upgrades\n\n\n### Detection\n\n\nExamine cloud provider logs for unexpected token exchanges, as well as unexpected access to cloud vault secrets.\n\n\nIf you find evidence that this vulnerability has been exploited, please contact [security@kubernetes.io](https://groups.google.com/)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "sigs.k8s.io/secrets-store-csi-driver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes-sigs/secrets-store-csi-driver/security/advisories/GHSA-g82w-58jf-gcxx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-2878"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes/kubernetes/issues/118419"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kubernetes-sigs/secrets-store-csi-driver"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kubernetes-sigs/secrets-store-csi-driver/releases/tag/v1.3.3"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/kubernetes-security-announce/c/5K8ghQHBDdQ/m/Udee6YUgAAAJ"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230814-0003"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-26T13:59:19Z",
    "nvd_published_at" : "2023-06-07T15:15:09Z"
  }
}