Skip to content

Talos worker join token can be used to get elevated access level to the Talos API

High severity GitHub Reviewed Published Sep 13, 2022 in siderolabs/talos • Updated Jul 21, 2023

Package

gomod github.com/talos-systems/talos (Go)

Affected versions

< 1.2.2

Patched versions

1.2.2

Description

Impact

Talos worker nodes use a join token to get accepted into the Talos cluster. A misconfigured Kubernetes environment may allow workloads to access the join token of the worker node. A malicious workload could then use the join token to construct a Talos CSR (certificate signing request). Due to improper validation while signing a worker node CSR, a Talos control plane node might issue a Talos certificate which allows full access to the Talos API to a worker node that presented a maliciously constructed CSR. Accessing the Talos API with full access on a control plane node might reveal sensitive information, which could allow full-level access to the cluster (Kubernetes and Talos PKI, etc.)

In order to exploit the weakness, a Kubernetes workload would need to access the join token, and then construct a specific kind of Talos CSR in order to obtain a privileged certificate. The Talos API join token is stored in the machine configuration on the worker node. When configured correctly, Kubernetes workloads do not have access to the machine configuration, and thus cannot access the token, nor acquire elevated privileges.

It is possible that users have misconfigured Kubernetes in such a way as to allow a workload to access the machine configuration and reveal the join token. Misconfigurations that may allow the machine configuration to be accessed on a worker node by the Kubernetes workload are:

  • allowing a hostPath mount to mount the machine config directly from the host filesystem (hostPath mounts should not be allowed for untrusted workloads, and are disabled by default in recent versions of Talos.)
  • reading machine configuration from a cloud metadata server from Kubernetes pods with host networking (on cloud platforms, when machine config is stored in the cloud metadata server, and the cloud metadata server doesn't provide enough protection to prevent access from non-host workloads)

Patches

The problem was fixed in Talos 1.2.2.

Workarounds

Enabling the Pod Security Standards mitigates the vulnerability by denying hostPath mounts and host networking by default in the baseline policy. Talos enables Pod Security Admission plugin by default since Talos v1.1.0.

Clusters that don't run untrusted workloads are not affected.
Clusters with correct Pod Security configurations which don't allow hostPath mounts, and secure access to cloud metadata server (or machine configuration is not supplied via cloud metadata server) are not affected.

References

For more information

If you have any questions or comments about this advisory:

References

@smira smira published to siderolabs/talos Sep 13, 2022
Published by the National Vulnerability Database Sep 13, 2022
Published to the GitHub Advisory Database Sep 16, 2022
Reviewed Sep 16, 2022
Last updated Jul 21, 2023

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
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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:H/UI:N/S:U/C:H/I:H/A:H

EPSS score

0.223%
(61st percentile)

CVE ID

CVE-2022-36103

GHSA ID

GHSA-7hgc-php5-77qq

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.