CVE-2023-2878: Sigs.k8s.io/secrets store csi driver Secrets-store-csi-driver Discloses Service Account Tokens Vulnerability
MODERATECVE-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.
CVE-2023-2878 at a Glance
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).
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.
Upgrade sigs.k8s.io/secrets-store-csi-driver to 1.3.3
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
CVE-2023-2878 Affected Sigs.k8s.io/secrets store csi driver Versions
1 component(s)| 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?
Which Sigs.k8s.io/secrets store csi driver versions are affected?
What version fixes CVE-2023-2878?
Is sigs.k8s.io/secrets-store-csi-driver affected?
What is the CVSS score of CVE-2023-2878?
What CWE is associated with CVE-2023-2878?
How can I check Go dependencies for CVE-2023-2878?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}