GHSA-xfj7-qf8w-2gcr CVE-2023-22649 GO-2024-2537
Rancher 'Audit Log' leaks sensitive information
- Severity
- 0.0 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 2.04%
- Chance of exploitation in the next 30 days. Higher than 81.12% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-532 Insertion of Sensitive Information into Log File
- Fix
2.6.14- Upgrade github.com/rancher/rancher to this version or later
Description
Impact
A vulnerability has been identified which may lead to sensitive data being leaked into Rancher's audit logs. Rancher Audit Logging is an opt-in feature, only deployments that have it enabled and have AUDIT_LEVEL set to 1 or above are impacted by this issue.
The leaks might be caught in the audit logs upon these actions:
- Creating cloud credentials or new authentication providers. It is crucial to note that all authentication providers (such as AzureAD) and cloud providers (such as Google) are impacted.
- Downloading a kubeconfig file from a downstream or a local cluster.
- Logging in/out from Rancher.
The affected data may include the following:
- HTTP headers
| Field | Location |
|---|---|
| X-Api-Auth-Header | Request header |
| X-Api-Set-Cookie-Header | Response header |
| X-Amz-Security-Token | Request header |
| credentials | Request body |
| applicationSecret | Request Body |
| oauthCredential | Request Body |
| serviceAccountCredential | Request Body |
| spKey | Request Body |
| spCert | Request body |
| spCert | Response body |
| certificate | Request body |
| privateKey | Request body |
- API Server calls returning
Secretobjects (including sub-types, such askubernetes.io/dockerconfigjson). - Raw command lines used by agents to connect to the Rancher server which expose sensitive information (e.g.
register ... --token abc). Kubeconfigcontents when the 'Download KubeConfig' feature is used in the Rancher UI.
The patched versions will redact the sensitive data, replacing it with [redacted], making it safer for consumption. It is recommended that static secrets are rotated after the system is patched, to limit the potential impact of sensitive data being misused due to this vulnerability.
Note:
- The severity of the vulnerability is intricately tied to the logging strategy employed. If logs are kept locally (default configuration), the impact is contained within the system, limiting the exposure. However, when logs are shipped to an external endpoint, the vulnerability's severity might increase, as resistance against leaks is contingent on the security measures implemented at the external log collector level.
- The final impact severity for confidentiality, integrity and availability is dependent on the permissions that the leaked credentials have on their own services.
Patches
Patched versions include releases 2.6.14, 2.7.10 and 2.8.2.
Workarounds
If AUDIT_LEVEL 1 or above is required and you cannot update to a patched Rancher version, ensure that the log is handled appropriately and it is not shared with other users or shipped into a log ingestion solution without the appropriate RBAC enforcement. Otherwise, disabling the Audit feature or decreasing it to the audit level 0, mitigates the issue.
For more information
If you have any questions or comments about this advisory:
- Reach out to the SUSE Rancher Security team for security related inquiries.
- Open an issue in the Rancher repository.
- Verify with our support matrix and product support lifecycle.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/rancher/rancher | >= 2.6.0, < 2.6.14 |
2.6.14 |
| github.com/rancher/rancher | >= 2.7.0, < 2.7.10 |
2.7.10 |
| github.com/rancher/rancher | >= 2.8.0, < 2.8.2 |
2.8.2 |
| github.com/rancher/rancher | all versions |
No fix yet |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/rancher/rancher Go → 2.6.14
- go
go get github.com/rancher/rancher@v2.6.14 && go mod tidy
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:H/VI:N/VA:N/SC:H/SI:H/SA:H
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- High
- User interaction
- Passive
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- None
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- High
- Integrity (subsequent systems)
- High
- Availability (subsequent systems)
- High
CVSS 3.1 7.7
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- High
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-532: Insertion of Sensitive Information into Log File
The product writes sensitive information to a log file.
How to prevent it
- Architecture and Design, Implementation: Consider seriously the sensitivity of the information written into log files. Do not write secrets into the log files.
- Distribution: Remove debug log files before deploying the application into production.
- Operation: Protect log files against unauthorized read/write.
- Implementation: Adjust configurations appropriately when software is transitioned from a debug state to production.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-4j6x-2764-m8gh Rancher has over-inclusive team membership expansion in GitHub App authentication provider | High | Also affects github.com/rancher/rancher |
| GHSA-vx8h-4prv-g744 Rancher has Privilege Escalation from Project Owner to Host | High | Also affects github.com/rancher/rancher |
| GHSA-mhc6-2gfq-xx62 Rancher vulnerable to command injection through unsanitized YAML parameter | Critical | Also affects github.com/rancher/rancher |
| GHSA-5v3h-x4wf-5c35 Rancher Extensions have arbitrary file access via path traversal | High | Also affects github.com/rancher/rancher |
| GHSA-gqf8-rvrh-g7w6 Rancher cloud credentials can be used through proxy API by users without access | Critical | Also affects github.com/rancher/rancher |
| GHSA-hwm2-4ph6-w6m5 Rancher's restricted PodSecurityPolicy does not prevent containers from running as a privileged user | High | Also affects github.com/rancher/rancher |
| GHSA-mc24-7m59-4q5p Rancher CLI skips TLS verification on Rancher CLI login command | Medium | Also affects github.com/rancher/rancher |
| GHSA-mw39-9qc2-f7mg Rancher exposes sensitive information through audit logs | Medium | Also affects github.com/rancher/rancher |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor