Skip to content

Users can issue watch commands for arbitrary resources

High
pdellamore published GHSA-j5hq-5jcr-xwx7 Nov 19, 2024

Package

gomod github.com/rancher/steve (Go)

Affected versions

<=b2f2bab (main)
<=7dafe0c (release/v2.9)
<=b0e3b52 (release/v2.8)

Patched versions

>=2175e09 (main)
>=6e30359 (release/v2.9)
>=c744f0b (release/v2.8)

Description

Impact

A vulnerability has been discovered in Steve API (Kubernetes API Translator) in which users can watch resources they are not allowed to access, when they have at least some generic permissions on the type. For example, a user who can get a single secret in a single namespace can get all secrets in every namespace.

During a watch request for a single ID, the following occurs:

  • In the case of a watch request for a single resource, Steve API will return a partition with the requested resource in it. In other cases, it will check the user's access when constructing partitions.
  • When a watch request for a single resource is issued, instead of using a client which impersonates the user making the request, Steve API will use the admin client, which can read all resources.

This allows any requester to see the contents of any object such as secret keys, signing certificates, API tokens.

Please consult the associated MITRE ATT&CK - Technique - Valid Accounts and MITRE ATT&CK - Technique - Container and Resource Discovery for further information about this category of attack.

Patches

To address this issue, the fix introduces a change in the behavior of the Steve API.

When issuing a watch request with an ID specified, the requester's permissions are now correctly honoured. This will deny events for objects the requester cannot actually access. Previously these events were returned unconditionally, allowing any requester to see the contents of any object.

Patched versions include the following commits:

Branch Commit
main 2175e09
release/v2.9 6e30359
release/v2.8 c744f0b

Workarounds

There are no workarounds for this issue. Users are recommended to upgrade, as soon as possible, to a version of Steve API/Rancher Manager which contains the fixes.

References

If you have any questions or comments about this advisory:

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

CVE ID

CVE-2024-52280