Skip to main content
Vulnerability Database/CVE-2026-85267

CVE-2026-85267: Google Cloud Platform Cloud Shell XSS

CVE-2026-85267 is a Cross-Site WebSocket Hijacking flaw in Google Cloud Platform Cloud Shell that lets attackers hijack sessions and steal OAuth tokens. This article covers the technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-85267 Overview

CVE-2026-85267 is a Cross-Site WebSocket Hijacking (CSWSH) vulnerability affecting Google Cloud Platform's Cloud Shell service prior to the 22 July 2026 patch. An unauthenticated attacker can hijack an active Cloud Shell session through a crafted cross-origin WebSocket request. Successful exploitation exfiltrates the authenticated user's OAuth access token, granting the attacker the same scope of access as the victim. The flaw is classified under CWE-1385 (Missing Origin Validation in WebSockets). Google remediated the issue server-side on 22 July 2026, and no customer action is required.

Critical Impact

Exploitation leaks a victim's Google Cloud OAuth access token, enabling unauthorized API access to Google Cloud resources tied to the hijacked session.

Affected Products

  • Google Cloud Platform Cloud Shell (service versions prior to the 22 July 2026 release)
  • Browser-based Cloud Shell sessions established before the patch rollout
  • Any Google Cloud account actively using Cloud Shell when visiting a malicious origin

Discovery Timeline

  • 22 July 2026 - Google releases the server-side patch for Cloud Shell
  • 20 October 2026 - CVE-2026-85267 published to NVD
  • 20 October 2026 - Last updated in NVD database

Technical Details for CVE-2026-85267

Vulnerability Analysis

Cloud Shell exposes an interactive terminal through a WebSocket endpoint reached from the browser. The server accepted WebSocket upgrade requests without validating the Origin header against an allowlist of trusted Google properties. An attacker who could lure an authenticated Cloud Shell user to a controlled web page could open a cross-origin WebSocket to the Cloud Shell backend. Because browsers automatically attach session cookies to WebSocket handshakes, the connection authenticated as the victim. The attacker's JavaScript could then issue shell commands and read responses, including the OAuth access token resident in the Cloud Shell environment variables.

Root Cause

The root cause is missing origin validation on the WebSocket upgrade handshake, consistent with CWE-1385. WebSockets are not constrained by the Same-Origin Policy in the same way as XMLHttpRequest or fetch, so servers must explicitly verify the Origin header or require a per-session CSRF token during the handshake. The vulnerable Cloud Shell endpoint did neither, allowing any origin to initiate an authenticated session on behalf of a signed-in user.

Attack Vector

Exploitation requires user interaction: the victim must be signed in to Google and visit an attacker-controlled page. The malicious page opens a WebSocket to the Cloud Shell endpoint, which inherits the victim's session cookies. The attacker then issues shell commands such as reads of $GOOGLE_APPLICATION_CREDENTIALS or invocations of gcloud auth print-access-token and exfiltrates the output over the hijacked channel. The captured OAuth token can be replayed against Google Cloud APIs until it expires. No code is reproduced here; see the Google Cloud Shell Release Notes for the vendor's description of the fix.

Detection Methods for CVE-2026-85267

Indicators of Compromise

  • Unexpected gcloud or gsutil API calls originating from IP addresses that do not match the user's typical geolocation or ASN.
  • Cloud Audit Logs showing AuthenticationInfo.principalEmail activity shortly after a Cloud Shell session was active in a browser that visited an untrusted site.
  • Short-lived OAuth access tokens used from user agents or clients other than Cloud Shell.

Detection Strategies

  • Review Google Cloud Audit Logs for sensitive API calls (IAM policy changes, service account key creation, Storage reads) correlated with Cloud Shell session windows.
  • Hunt for anomalous caller_ip values in Cloud Shell terminal telemetry prior to 22 July 2026.
  • Alert on OAuth token usage patterns that diverge from historical baselines for high-privilege principals.

Monitoring Recommendations

  • Enable Data Access audit logs across projects that previously relied on Cloud Shell for administration.
  • Forward GCP audit logs into a centralized analytics platform for cross-correlation with endpoint and identity telemetry.
  • Baseline normal gcloud invocation patterns per principal and alert on deviations.

How to Mitigate CVE-2026-85267

Immediate Actions Required

  • Confirm that no customer action is required; Google patched the service on 22 July 2026 as stated in the advisory.
  • Audit Cloud Audit Logs between the earliest potentially vulnerable window and 22 July 2026 for suspicious API activity tied to Cloud Shell users.
  • Rotate any long-lived credentials or service account keys that may have been exposed through a Cloud Shell session during the exposure window.
  • Revoke outstanding OAuth grants for users suspected of visiting untrusted sites while a Cloud Shell session was active.

Patch Information

Google deployed the fix server-side on 22 July 2026. There is no customer-installable patch. See the Google Cloud Shell Release Notes for vendor confirmation. All Cloud Shell sessions opened after the patch date validate the Origin header on the WebSocket handshake.

Workarounds

  • No workaround is required post-patch; the fix is applied automatically at the service layer.
  • For defense-in-depth, enforce short OAuth token lifetimes and require reauthentication for sensitive operations.
  • Restrict Cloud Shell usage via organization policy for principals that do not require it.
bash
# Example: list recent sensitive API activity for a user to validate exposure
gcloud logging read \
  'protoPayload.authenticationInfo.principalEmail="user@example.com" AND \
   protoPayload.methodName=~"(SetIamPolicy|CreateServiceAccountKey)"' \
  --freshness=120d --limit=100 --format=json

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.