# GHSA-QV29-QXGH-JCW8: Google access token disclosure through improper inverse-proxy endpoint validation in the Python SDK

- Database: GitHub
- Severity: CVSS 6.5 (Medium)
- Published: 2026-11-18
- Modified: 2026-11-18

## Affected versions

- kfp (PyPI): from 0.1.29, through 2.18.0

## Description

## Release status — November 18, 2026

Fixed in [PyPI `kfp` 2.18.1](https://pypi.org/project/kfp/2.18.1/), published November 18, 2026. The containing SDK tag and release contents were checked. Upgrade installed SDK environments separately; a server upgrade does not update an installed SDK. The affected range below is unchanged, and patched-version metadata is now `2.18.1`.

## Summary

The Python SDK automatically selects Google Application Default Credentials (ADC) for endpoints it recognizes as Google inverse proxies. The recognition check applies a permissive regular expression to the entire endpoint URL rather than validating the parsed hostname.

An attacker who persuades a user to configure an attacker-controlled endpoint can cause the SDK to obtain a Google access token and include it in the Authorization header of requests to that endpoint. This is client-side credential disclosure, not server-side SSRF.

## Affected product and versions

The affected product is the PyPI package `kfp`, not the frontend container or the pipeline-spec package. The automatic inverse-proxy credential-selection feature was introduced in commit 8d5ec83f5e26312ee6cecabe647e79f3c7bf1e9b (#1993), first contained in release 0.1.29. The earlier regex also matched attacker-controlled URLs; #2486 changed its matching pattern without establishing an authority boundary.

The defect affects PyPI SDK 2.18.0 and is fixed in SDK 2.18.1. The source fix merged on the development line on September 26, 2026 and was subsequently backported. SDK 2.15.2 is also affected; the original report's `< 2.15.2` range was incorrect. The affected range is `>= 0.1.29, <= 2.18.0`. Server/repository release numbers must not be substituted for PyPI SDK versions.

## Preconditions and impact

- The victim configures a malicious endpoint, for example through an untrusted endpoint recommendation or configuration.
- Usable Google ADC must be available to the SDK.
- An automatic Google credential-selection path must be reached. At initial configuration, an explicitly supplied existing token or client ID takes precedence. Review also identified a polling refresh path: after a successful run response followed by a 401, the unpatched SDK can select Google ADC without validating the endpoint or preserving the original authentication mode. An attacker-controlled endpoint can trigger that path while the victim waits for a run.

The SDK requests the cloud-platform OAuth scope and attaches the resulting access token as a Bearer credential. Actual access available with the disclosed token is constrained by the credential's IAM permissions and other Google Cloud controls. This does not establish automatic administrator access, disclosure of a refresh token, or exploitation without victim interaction.

Without usable ADC, this path does not disclose a Google access token. Explicitly supplying credentials for an arbitrary endpoint is separate from this vulnerability: the defect is the SDK's unintended automatic selection of ambient Google credentials.

## Technical details and validation

The check in released SDK 2.18.0 is:

```python
re.match(r'\S+.googleusercontent.com/{0,1}$', host)
```

It accepts lookalike domains such as `https://my-googleusercontent.com`. It also accepts an unrelated authority with a misleading path, such as `https://attacker.example/service.googleusercontent.com`.

The maintainer reproduced automatic token acquisition and Bearer header generation using production SDK configuration/authentication methods and generated API-client header methods with synthetic credentials. The initial validation covered SDK 2.15.2, repository tag 2.17.2, and the current checkout. No real Google credentials or requests to attacker-controlled services were used.

## Severity and CVSS rationale

CVSS v3.1: **6.5 (Medium)** — `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`.

- **AV:N / PR:N:** An attacker-controlled network endpoint can receive the credential; the attacker needs no prior access to the victim's SDK or cloud account.
- **AC:L / UI:R:** The victim must configure the malicious endpoint, but token disclosure is deterministic in the affected ADC configuration. User interaction is counted under UI, not again as high attack complexity.
- **C:H:** The SDK discloses a complete, usable bearer credential, constituting a serious confidentiality loss within that credential's permissions.
- **S:U / I:N / A:N:** This assessment scores disclosure of the credential handled by the SDK. It does not assume a separate cloud-resource compromise, administrative IAM permissions, modification of cloud data, or service disruption.

Actual downstream consequences depend on the credential's IAM permissions and environment. The cloud-platform OAuth scope alone does not confer administrator access. See the [FIRST CVSS v3.1 specification](https://www.first.org/cvss/v3.1/specification-document) for metric definitions.

## Remediation

Escaping the regex dots alone is insufficient: it still accepts a Google-looking path on an unrelated host. The fix must validate the parsed HTTPS hostname and reject ambiguous or malformed authorities before selecting Google credentials.

The source fix merged in [PR #14527](https://github.com/kubeflow/pipelines/pull/14527) on September 26, 2026 as `b7882572cf2316ce849c91bb4fc345e096ae3f46`. It restricts automatic selection to valid subdomains of `googleusercontent.com` over HTTPS on the default port or port 443, rejects userinfo, whitespace/control characters, backslashes, queries and fragments, and tests the resulting authentication headers. Scheme-less supported endpoints continue to be normalized to HTTPS by the SDK. Existing-token and client-ID authentication retain precedence over automatic ADC; the explicit credential-provider compatibility follow-up is described below. Token refresh now requires that automatic Google authentication was originally selected and revalidates the endpoint; a polling 401 cannot switch an unrelated endpoint or explicit authentication mode to Google ADC. Failed refreshes preserve the existing token.

Verification: all 110 SDK client tests pass, including 40 new security/compatibility cases. Restoring the original host check makes 16 cases fail; restoring the original refresh helper makes 6 of its 7 targeted cases fail. Tests exercise the successful-poll/401/retry sequence and inspect outgoing authentication headers. Changed-file repository hooks pass. Tests use synthetic credentials and do not send real Google tokens to external services.

Release `sdk-2.18.0` at `555bfa60a70da88c594960bdacfd78fa7c061043` does not contain this fix. The [released host check](https://github.com/kubeflow/pipelines/blob/sdk-2.18.0/sdk/python/kfp/client/client.py#L335) still uses the permissive regular expression above. Inspection of the published [PyPI `kfp` 2.18.0 wheel](https://pypi.org/project/kfp/2.18.0/) confirmed the same implementation, with its downloaded bytes verified against PyPI's published SHA-256. This release remains affected; a server upgrade alone does not fix an installed SDK. The first patched SDK release is 2.18.1.

The backport merged into `release-2.18` in [PR #15254](https://github.com/kubeflow/pipelines/pull/15254) on October 29, 2026 as `6a2024dc24e8b8794be7c3ec471b7abcf81e2135`. Its client suite passed 116 tests. This backport is included in released SDK 2.18.1.

The credential-provider compatibility follow-up also merged: [PR #15262](https://github.com/kubeflow/pipelines/pull/15262) on `release-2.18` (`bc07f64c59c75bbe23f0bc9c5e98d6f92a04f675`) and [PR #15263](https://github.com/kubeflow/pipelines/pull/15263) on master (`9ffbcfc4866db12910c8b3eb9da06573592d9e6c`). Explicit `credentials` providers now take precedence over automatic ADC on trusted Google endpoints, including URLs ending in `/pipeline`, and polling refresh cannot switch that authentication mode to ADC. Regression tests verify outgoing headers with and without ambient ADC. All 118 client tests on the release branch and 126 on master passed locally, along with changed-file hooks.

The security fix and credential-provider follow-up are now merged on both development lines. SDK 2.18.1 contains both changes; SDK 2.18.0 remains affected.

## Workarounds

Use only independently verified Google inverse-proxy endpoints and do not copy endpoint URLs from untrusted sources. Avoid running an SDK configured with an untrusted endpoint in an environment with Google ADC.

## Credit

Reported by @ravikumar266. Maintainer validation expanded the report to cover URL authority/path confusion and confirmed that the proposed dot-escaping-only patch would be incomplete.

## References

- https://github.com/kubeflow/pipelines/security/advisories/GHSA-qv29-qxgh-jcw8

Page: https://cve.now/GHSA-QV29-QXGH-JCW8

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
