Skip to content

CVE-2019-11243: rest.AnonymousClientConfig() does not remove the serviceaccount credentials from config created by rest.InClusterConfig() #76797

@liggitt

Description

@liggitt

CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N

The rest.AnonymousClientConfig() method returns a copy of the provided config, with credentials removed (bearer token, username/password, and client certificate/key data).

In the following versions, rest.AnonymousClientConfig() did not effectively clear service account credentials loaded using rest.InClusterConfig():

  • v1.12.0-v1.12.4
  • v1.13.0

What is the impact?

  • k8s.io/client-go users that use the rest.AnonymousClientConfig() method directly with client config loaded with rest.InClusterConfig() receive back a client config which can still send the loaded service account token with requests.

How was the issue fixed?

How do I resolve the issue?

  • Upgrade k8s.io/client-go to kubernetes-1.12.5, kubernetes-1.13.1, kubernetes-1.14.0, or higher
  • or manually clear the config.WrapTransport and config.Transport fields in addition to calling rest.AnonymousClientConfig()

Thanks to Oleg Bulatov of Red Hat for reporting this issue.

/area security
/kind bug
/sig auth
/sig api-machinery
/assign
/close

Metadata

Metadata

Assignees

Labels

area/securitykind/bugCategorizes issue or PR as related to a bug.official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.sig/authCategorizes an issue or PR as relevant to SIG Auth.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions