Impact
A vulnerability has been identified in Rancher's Extensions where malicious code can be injected in Rancher through a path traversal in the compressedEndpoint field inside a UIPlugin deployment. A malicious UI extension could abuse that to:
- Overwrite Rancher binaries or configuration to inject code.
- Write to
/var/lib/rancher/ to tamper with cluster state.
- If
hostPath volumes are mounted, write to the host node filesystem.
- Use this issue to chain with other attack vectors.
By default only the administrator can deploy UI extensions, unless permissions are granted to other users. It's always recommended to only install extensions that come from sources trusted by the user.
Please consult the associated MITRE CAPEC-126 - Technique - Path Traversal for further information about this category of attack.
Patches
This vulnerability is addressed by ensuring that:
- The file defined by the UI Plugin CR's
compressedEndpoint has to be created inside the cache directory and cannot contain ../. If that is not possible, the installation will fail and the file won't be created.
- The icons referenced by Cluster Repos'
index.yaml file always resolves to a file inside the repository directory.
Patched versions of Rancher include releases v2.14.1, v2.13.5, v2.12.9, v2.11.13.
Workarounds
There is no workaround. The user must be careful about which UI Plugins they install.
Resources
If there are any questions or comments about this advisory:
References
Impact
A vulnerability has been identified in Rancher's Extensions where malicious code can be injected in Rancher through a path traversal in the
compressedEndpointfield inside aUIPlugindeployment. A malicious UI extension could abuse that to:/var/lib/rancher/to tamper with cluster state.hostPathvolumes are mounted, write to the host node filesystem.By default only the administrator can deploy UI extensions, unless permissions are granted to other users. It's always recommended to only install extensions that come from sources trusted by the user.
Please consult the associated MITRE CAPEC-126 - Technique - Path Traversal for further information about this category of attack.
Patches
This vulnerability is addressed by ensuring that:
compressedEndpointhas to be created inside the cache directory and cannot contain../. If that is not possible, the installation will fail and the file won't be created.index.yamlfile always resolves to a file inside the repository directory.Patched versions of Rancher include releases v2.14.1, v2.13.5, v2.12.9, v2.11.13.
Workarounds
There is no workaround. The user must be careful about which UI Plugins they install.
Resources
If there are any questions or comments about this advisory:
References