Skip to content

[v18] kube: validate impersonation principals against RFC 2616#64586

Open
tigrato wants to merge 1 commit intobranch/v18from
tigrato/kubeheadervalidationv18
Open

[v18] kube: validate impersonation principals against RFC 2616#64586
tigrato wants to merge 1 commit intobranch/v18from
tigrato/kubeheadervalidationv18

Conversation

@tigrato
Copy link
Contributor

@tigrato tigrato commented Mar 12, 2026

Backport of #64488 to branch/v18

Changelog: Validate Kubernetes impersonation user and group header values to prevent CRLF or null-byte header injection via crafted role definitions

* kube: validate impersonation principals against RFC 2616

Validate the kubernetes impersonation user and group values computed in
computeImpersonatedPrincipals using httpguts.ValidHeaderFieldValue before
they are forwarded as HTTP headers. This rejects values containing CRLF
sequences or null bytes that could otherwise be used for header injection
attacks via crafted role definitions.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* handle julia's feedback

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants