TeamCity before 2026.2 Let the Host Header Shape OAuth Discovery
JetBrains fixed CVE-2026-132926 in TeamCity 2026.2. Before that release, an incoming X-Forwarded-Host value could poison the OAuth discovery metadata returned by TeamCity. The CVE record describes a medium-severity issue with a CVSS 3.1 score of 4.2 and requires user interaction. Its practical importance comes from the trust boundary it crosses: an identity client uses discovery metadata to decide where to send authorization requests and exchange tokens.
Discovery documents are not passive configuration. They carry issuer names, authorization endpoints, token endpoints, and sometimes registration or user-info locations. If an upstream proxy preserves a client-controlled host header and TeamCity uses it to build those absolute URLs, a user can be shown a flow that looks like the expected application while the identity exchange points somewhere else. The attacker still has to reach a request path that accepts the header and persuade a user or client to follow the poisoned result. That is enough to make host validation reviewable.
The relevant control belongs at two layers. First, the reverse proxy should overwrite host-related headers with a configured public hostname and reject inconsistent values. Forwarding a header is only safe when the next service knows which hop is trusted. Second, the application should derive issuer and discovery values from a fixed configuration, not from the current request. HTTPS alone does not solve this problem. A valid certificate for an attacker-controlled hostname can still carry malicious metadata.
Administrators should identify every OIDC or OAuth client that consumes TeamCity discovery data. After upgrading, clear cached metadata where the client supports it and confirm that the authorization and token endpoints match the intended deployment. Tests should send mismatched Host and X-Forwarded-Host headers through the real proxy chain and assert that the public document does not change.
The CVE is narrow, but the check can be reused. Any service that publishes absolute identity endpoints should have a test for spoofed forwarding headers. An endpoint that never changes in a direct test may still change behind the production proxy.
Top comments (0)