Skip to navigation

Threat reportVulnerabilityTL-2026-3355

Google DevSite Flask Session Pickle Deserialization RCE (Unauthenticated) - OAuth Client Secret Reused as Flask SECRET_KEY

criticalPATCHED

Researcher Simon Köck disclosed an unauthenticated remote code execution flaw in Google's DevSite documentation platform. The /oauth2authorize endpoint issued a Flask session cookie containing a pickled OAuth2WebServerFlow object with the plaintext client_secret, which was also the Flask SECRET_KEY, so an attacker could forge sessions carrying malicious pickle objects that the server unpickled.

Key facts

IdentifiersTL-2026-3355
SeverityCRITICAL
First disclosed
Affected productsGoogle DevSite documentation platform (developers.google.com, firebase.google.com, developer.android.com, source.android.com, docs.partner.android.com)
Weaknesses (CWE)CWE-502, CWE-798, CWE-321, CWE-312
MalwarePython
Toolscurl, pickletools.dis
MITRE ATT&CK techniquesT1059.006 Python, T1190 Exploit Public-Facing Application, T1212 Exploitation for Credential Access, T1550.004 Use Alternate Authentication Material: Web Session Cookie, T1552 Unsecured Credentials, T1606.001 Forge Web Credentials: Web Cookies
MotivationUNKNOWN
Target sectorstechnology, software-development, cloud
Target regionsGlobal
Detection rules9 (1 shown free)
Sources6 cited sources

Detection coverage

As of 2026-10-12, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-3355 across Splunk SPL, Microsoft KQL and Sigma, covering 14 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: Python Web Worker Spawning Shell or Host-Recon Utilities - Flask Pickle RCE Post-Exploitation

Detects a Python WSGI/ASGI server process (gunicorn, uwsgi, flask, werkzeug, hypercorn, uvicorn) spawning sh/bash/dash or whoami/id/uname/hostname. After pickle.loads() on a forged Flask session, attacker callables run inside the worker and typically spawn a Unix shell for hands-on recon of the account and host (TL-2026-3355). Covers Python execution, Unix shell, system owner discovery and system information discovery.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1059.006, T1059.004, T1033, T1082, T1190
  • Data sources: sysmon_for_linux, linux_process_creation
  • Severity: high
  • Confidence: medium

Splunk SPL

index=linux sourcetype="sysmon:linux" EventCode=1 earliest=-24h (ParentCommandLine="*gunicorn*" OR ParentCommandLine="*uwsgi*" OR ParentCommandLine="*flask run*" OR ParentCommandLine="*werkzeug*" OR ParentCommandLine="*hypercorn*" OR ParentCommandLine="*uvicorn*")
(Image="*/sh" OR Image="*/bash" OR Image="*/dash" OR Image="*/whoami" OR Image="*/id" OR Image="*/uname" OR Image="*/hostname")
| stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as child_commands by Computer, User, ParentCommandLine, Image
| convert ctime(first_seen) ctime(last_seen)

Microsoft KQL

DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessCommandLine has_any ("gunicorn","uwsgi","flask run","werkzeug","hypercorn","uvicorn")
| where FileName in~ ("sh","bash","dash","whoami","id","uname","hostname")
| project Timestamp, DeviceName, AccountName, InitiatingProcessCommandLine, FileName, ProcessCommandLine

Sigma

title: Python Web Worker Spawning Shell Or Recon Utility (TL-2026-3355)
id: d5f0b2c8-3e49-4b70-a6d1-2a09e8f4d404
status: experimental
description: Detects a Python web application server (gunicorn, uwsgi, flask, werkzeug, hypercorn, uvicorn) spawning a shell or host-recon utility, the result of a pickle __reduce__ payload calling os.system or subprocess (TL-2026-3355).
references:
    - https://simonkoeck.com/writeups/google-devsite-flask-session-pickle-rce
    - https://gbhackers.com/critical-google-devsite-flaw/
    - https://cwe.mitre.org/data/definitions/502.html
author: Threadlinqs Team
date: 2026-10-12
tags:
    - attack.execution
    - attack.t1059.006
    - attack.t1059.004
    - attack.discovery
    - attack.t1033
    - attack.t1082
    - attack.initial-access
    - attack.t1190
logsource:
    category: process_creation
    product: linux
detection:
    selection_parent:
        ParentCommandLine|contains:
            - 'gunicorn'
            - 'uwsgi'
            - 'flask run'
            - 'werkzeug'
            - 'hypercorn'
            - 'uvicorn'
    selection_child:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
            - '/whoami'
            - '/id'
            - '/uname'
            - '/hostname'
    condition: selection_parent and selection_child
falsepositives:
    - Applications that intentionally shell out for image processing or health checks
    - Deployment hooks run by the app server
level: high

Known false positives:

  • Apps that deliberately shell out (image conversion, git, health checks)
  • Container entrypoint scripts launched by the app server

Tuning notes: Baseline legitimate child processes of your app servers and allow-list exact command lines. A web worker normally never spawns an interactive shell, so keep the shell list strict. Add auditd or EDR sources if Sysmon for Linux is not deployed.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple)
  • Flask Forged Session Probing - Rejected Then Accepted OAuth Callbacks (Exploitation) · unlock with TL Creds
  • Python Web Worker Harvesting Secrets or Cloud Metadata (Post-Exploitation) · unlock with TL Creds
  • Python Web Worker Outbound Callback To Public IP On Non-Web Port (C2 / Reverse Shell) · unlock with TL Creds
  • Scripted Client Fetching Flask Session Cookie From /oauth2authorize (Exploitation) · unlock with TL Creds
  • Python Web Worker Spawning Download or Reverse Shell Tooling (Post-Exploitation / C2 Staging) · unlock with TL Creds
  • Flask OAuth '[indicator]' - Forged Session Accepted Without Flow (Session Forgery) · unlock with TL Creds
  • Flask Pickle Session RCE - Slow OAuth Callback After /oauth2authorize (Exploitation) · unlock with TL Creds
  • Forged Flask Session Cookie Replayed Across Sources or Hosts (Session Forgery / Lateral Reuse) · unlock with TL Creds

Indicators of compromise

As of 2026-10-12, Threadlinqs Intelligence tracks 14 indicators of compromise for TL-2026-3355.

Sample indicators (3 of 14)

  • Domain: developers[.]google[.]com
  • Domain: firebase[.]google[.]com
  • Domain: developer[.]android[.]com

Defanged, TLP:CLEAR. Full set of 14 indicators: unlock with TL Creds.

14 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

Google fixed it on 2026-10-07 and paid a $90,000 VRP reward.

DevSite is the shared documentation platform behind developers.google.com, firebase.google.com, developer.android.com, source.android.com and docs.partner.android.com. According to the researcher's write-up, the platform shared one signing key across seven Google domains (five are named in the sources; two are referenced but not listed).

The flaw was a chain of three weaknesses. First, an unauthenticated request to the /oauth2authorize endpoint (with a return_url parameter) returned a Flask 'session' cookie. The cookie used Flask's standard <payload>.<timestamp>.<signature> format and was zlib-compressed (leading dot in the payload, roughly 1,200 bytes). After decompression and base64 decoding it held JSON with '_permanent': true, a 'google_oauth2_csrf_token' and a 'google_oauth2_flow_<csrf>' entry whose ' b' key tagged a bytes value: a pickle-serialized oauth2client.client.OAuth2WebServerFlow object including the plaintext client_id and client_secret. Second, the client_secret was also used as the Flask SECRET_KEY: the signing key was derived with hmac.digest(client_secret, b'cookie-session', 'sha1') (itsdangerous key derivation) and the researcher reproduced the cookie signature byte-for-byte, so anyone who read the cookie could recover the key and sign arbitrary sessions - the signing key was stored inside the object it signs. Third, the OAuth callback called pickle.loads() on session data after the signature check, so a forged session containing a pickle payload (REDUCE opcode / __reduce__) ran attacker-chosen Python callables on the server.

The researcher proved code execution safely with time.sleep(N) payloads; response delay tracked the injected duration (sleep(0) 0.207s, sleep(3) 3.193s, sleep(5) 5.194s, sleep(8) 8.283s). Control tests: no cookie and a corrupted signature returned 'Invalid request'; flipping one signature character caused rejection while re-signing with the recovered secret was accepted; a valid signature with no flow entry returned 'Invalid request state'; a valid signature with a real OAuth flow reached token exchange and failed at authorization code validation. Tools used were curl, Python base64/json/zlib/hmac, pickletools.dis and a custom __reduce__ class.

Google triaged the report on 2026-08-07 and approved a $90,000 reward on 2026-08-27 ($75,000 base for Google Applications T2 severity with a 1.2x multiplier for report quality). The fix was deployed on 2026-10-07. Remediation required four changes: rotate the exposed OAuth credentials and invalidate sessions signed with them; use independent high-entropy SECRET_KEY values per instance; keep OAuth flow objects server-side with opaque session references in the cookie; and replace pickle with schema-validated data-only formats. No CVE, CVSS score, in-the-wild exploitation, threat actor or network IOCs are reported in the sources.

MITRE ATT&CK techniques by tactic:

Execution

T1059.006 Python

Initial Access

T1190 Exploit Public-Facing Application

Credential Access

T1212 Exploitation for Credential Access; T1552 Unsecured Credentials; T1606.001 Forge Web Credentials: Web Cookies

lateral-movement

T1550.004 Use Alternate Authentication Material: Web Session Cookie

Lateral Movement

T1550.004 Use Alternate Authentication Material: Web Session Cookie

Remediation

Patches

  • Google deployed the fix on DevSite on 2026-10-07; no customer action is required for Google-hosted properties

Immediate actions

  • Rotate any OAuth client secrets that were ever exposed in session cookies and invalidate all sessions signed with them
  • Generate independent high-entropy SECRET_KEY values per server instance, decoupled from OAuth credentials
  • Audit Flask applications for SECRET_KEY values that equal OAuth client secrets or other values present in client-visible data

Workarounds

  • For self-hosted Flask apps with similar patterns, disable pickle-based session interfaces and force re-authentication after rotating keys

Longer-term hardening

  • Keep OAuth flow objects server-side and store only opaque session references in cookies
  • Replace pickle-based session serialization with schema-validated data-only formats such as JSON
  • Add code review and SAST rules that flag pickle.loads() on request-derived data

Affected and fixed versions

  • Google — DevSite documentation platform (developers.google.com, firebase.google.com, developer.android.com, source.android.com, docs.partner.android.com)
    Vulnerable versions: Hosted service prior to 2026-10-07
    Fixed in: Hosted service fix deployed 2026-10-07

Timeline

  • Simon Köck submitted the report to Google's Vulnerability Reward Program (22:48).
  • Google accepted the report as a valid vulnerability (16:23).
  • Google triaged the report (08:12).
  • Google approved a $90,000 reward: $75,000 base for Google Applications T2 severity with a 1.2x multiplier for exceptional report quality.
  • Google deployed the fix (15:20): OAuth credentials rotated, sessions invalidated, independent signing keys and removal of pickle-based session handling.
  • Public write-up published by the researcher and covered by GBHackers.

Sources cited

Previous and next in vulnerability

Drafted by the Threadlinqs research pipeline from 6 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats