Threat reportVulnerabilityTL-2026-4315
Python2Shell: Brotli decoder out-of-bounds write in PyPI Brotli/brotlicffi (CVE-2026-111497)
A memory-safety flaw in the Brotli C decoder's DecodeBlockTypeAndLength() conflates 'malformed stream' with 'need more input', letting a crafted Brotli stream drive out-of-bounds writes. Python apps using urllib3/requests, httpx, aiohttp or Scrapy are exposed whenever Brotli or brotlicffi is installed, even without explicit Brotli imports.
Key facts
| Identifiers | TL-2026-4315, CVE-2026-111497, CVE-2026-115936 |
|---|---|
| Also known as | Python2Shell, Node2Shell |
| Severity | CRITICAL |
| CVSS | 9.2 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N) |
| First disclosed | |
| Exploitation status | Linked CVE exploited in the wild; Listed in CISA KEV: CVE-2026-111497 (added ) |
| EPSS | CVE-2026-111497: 82.6% (99.6th percentile) |
| Affected products | Google / PyPI Brotli (PyPI); PyPI brotlicffi; Python ecosystem urllib3, requests, httpx, aiohttp, Scrapy (exposed when Brotli/brotlicffi is installed); OpenJS Foundation Node.js (related Node2Shell flaw) |
| Weaknesses (CWE) | CWE-252, CWE-787 |
| Malware | Python, httpclient - S0068 |
| MITRE ATT&CK techniques | T1005 Data from Local System, T1059 Command and Scripting Interpreter, T1068 Exploitation for Privilege Escalation, T1189 Drive-by Compromise, T1190 Exploit Public-Facing Application, T1203 Exploitation for Client Execution, T1212 Exploitation for Credential Access, T1499 Endpoint Denial of Service, T1499.004 Application or System Exploitation |
| Motivation | UNKNOWN |
| Target sectors | technology, software development, cloud services, web services |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 8 cited sources |
Detection coverage
As of 2026-10-27, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-4315 across Splunk SPL, Microsoft KQL and Sigma, covering 62 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: Python2Shell Post-Exploitation - Python Web/Crawler Worker Spawning Shell or Download Utility
Detects a Python service process (python, gunicorn, uvicorn, scrapy, celery) spawning a shell, curl, wget or netcat. Successful exploitation of CVE-2026-111497 (TL-2026-4315) through the Brotli or brotlicffi decoder can yield command execution in the Python process context (Imperva demonstrated RCE for the Node.js variant). Web and crawler workers rarely spawn shells or downloaders, so this is a high-signal post-exploitation indicator. No in-the-wild exploitation is reported, so this rule is anticipatory.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1203, T1059, T1059.004, T1059.006
- Data sources: sysmon:linux (index=linux), DeviceProcessEvents (Defender for Endpoint on Linux), linux process_creation
- Severity: critical
- Confidence: medium
Splunk SPL
index=linux sourcetype="sysmon:linux" EventCode=1 earliest=-24h (ParentImage="*/python*" OR ParentImage="*/gunicorn" OR ParentImage="*/uvicorn" OR ParentImage="*/scrapy" OR ParentImage="*/celery") (Image="*/sh" OR Image="*/bash" OR Image="*/dash" OR Image="*/curl" OR Image="*/wget" OR Image="*/nc" OR Image="*/ncat" OR Image="*/busybox")
| stats count min(_time) AS first_seen max(_time) AS last_seen values(CommandLine) AS commands by host, User, ParentImage, ParentCommandLine, ImageMicrosoft KQL
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (InitiatingProcessFileName startswith "python" or InitiatingProcessFileName in~ ("gunicorn", "uvicorn", "scrapy", "celery"))
| where FileName in~ ("sh", "bash", "dash", "curl", "wget", "nc", "ncat", "busybox")
| summarize SpawnCount = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp), Commands = make_set(ProcessCommandLine, 10) by DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName
| project DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, SpawnCount, FirstSeen, LastSeen, CommandsSigma
title: Python Service Process Spawning Shell After Brotli Decoder Exploitation (CVE-2026-111497)
id: b2d4f608-3c5e-4b79-8d12-4f608ab2d332
status: experimental
description: Detects a Python service process (python, gunicorn, uvicorn, scrapy, celery) spawning a shell, curl, wget or netcat, a possible post-exploitation indicator of CVE-2026-111497 Brotli decoder exploitation (Python2Shell, TL-2026-4315).
references:
- https://github.com/advisories/GHSA-9v8h-qqgm-4m35
- https://www.imperva.com/blog/node2shell-from-brotli-data-to-remote-code-execution/
author: Threadlinqs Team
date: 2026-10-23
tags:
- attack.execution
- attack.t1203
- attack.t1059
- attack.t1059.004
- attack.t1059.006
- cve.2026.111497
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|contains:
- '/python'
- '/gunicorn'
- '/uvicorn'
- '/scrapy'
- '/celery'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/curl'
- '/wget'
- '/nc'
- '/ncat'
- '/busybox'
condition: selection_parent and selection_child
falsepositives:
- Deployment or health-check scripts that shell out from Python
- Python applications that intentionally call subprocess with sh or curl
level: highKnown false positives:
- Python applications that legitimately call subprocess to run sh, curl or wget
- Deployment, build or health-check scripts launched from Python workers
Tuning notes: Baseline parent/child pairs on each service host for two weeks and allowlist expected CommandLine patterns. Restrict to hosts that install Brotli or brotlicffi to cut noise. Treat any hit from a crawler or webhook worker as high priority.
- Python2Shell (CVE-2026-111497) - Python HTTP Client Receiving [indicator] Response from Low-Prevalence External Host · unlock with TL Creds
- Python2Shell Post-Exploitation - Python Worker Download-and-Execute (curl/wget to /tmp or piped to sh) · unlock with TL Creds
- Python2Shell C2 - Shell/Netcat/Curl Spawned by Python Worker Connecting to Public IP · unlock with TL Creds
- Python2Shell (CVE-2026-111497) - [indicator] Request Body Producing Server Error (Sigma) · unlock with TL Creds
- Python2Shell Post-Exploitation - Python Worker Reconnaissance and Secret Harvesting (Sigma) · unlock with TL Creds
- Python2Shell C2 - Reverse Shell Command-Line Patterns on Linux (Sigma) · unlock with TL Creds
- Python2Shell (CVE-2026-111497) - Inbound [indicator] Request Bodies to Web Services · unlock with TL Creds
- Python2Shell Decoder Fault - Python Process Fault in [indicator]/[indicator] Native Module · unlock with TL Creds
Indicators of compromise
As of 2026-10-27, Threadlinqs Intelligence tracks 62 indicators of compromise for TL-2026-4315.
Technical analysis
Fixed in Brotli 1.2.1 and brotlicffi 1.2.1.0; no in-the-wild exploitation reported.
CVE-2026-111497 (nicknamed Node2Shell for Node.js and Python2Shell for the Python packages) is an unchecked-return-value (CWE-252) bug leading to an out-of-bounds write (CWE-787) in Google's Brotli decoder (c/dec/decode.c). DecodeBlockTypeAndLength() returns a plain BROTLI_BOOL, so BROTLI_FALSE can mean either 'this stream is malformed' or 'I need more input'. Block-switch callers treated the result as recoverable, and the fast decode path discarded it entirely, so decoding continued with invalid internal state and wrote past the ring buffer. The CVE record places the bug in Brotli 1.0.3 through 1.2.0 (fixed in 1.0.10, 1.1.1 and 1.2.1). The upstream fix makes the function return an error code and adds BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH (-17).
In the Python ecosystem the PyPI packages Brotli (<=1.2.0) and brotlicffi (<=1.2.0.x) bundle the vulnerable decoder. Aikido and OpenSourceMalware report that HTTP clients automatically decode Brotli responses when these packages are installed: urllib3/requests, httpx (brotli extra), aiohttp and Scrapy. Any service that fetches attacker-influenced URLs (webhooks, URL previews, crawlers, proxies) can therefore receive a malicious Content-Encoding: br response, and frameworks that accept Content-Encoding: br request bodies are reachable inbound. OpenSourceMalware testing showed that crafted streams made vulnerable 1.2.0 decoders report NEEDS_MORE_INPUT on complete payloads, while patched versions return ERROR -17 FORMAT_BLOCK_SWITCH. Brotli on PyPI has roughly 82.8 million monthly downloads. Neither package's release notes mention the vulnerability, and as of 2026-10-23 pip-audit, Dependabot and Safety did not yet flag the affected versions.
Impact ranges from process crashes and memory disclosure to potential remote code execution in the process context. Public exploitation work so far targets Node.js: Imperva published a working RCE PoC (Node.js 24.22.0 on Linux arm64, via fetch() responses and Express 5.0.0-5.3.0 / body-parser 2.0.0-2.3.0 request bodies; reliability required multiple attempts), and Vercel reports researchers achieved memory disclosure and command execution. No public PoC specific to the Python packages and no in-the-wild exploitation or attribution were reported in the sources reviewed. Node.js shipped fixes (22.23.4, 24.22.1, 26.12.1) on 2026-10-21; Brotli 1.2.1 reached PyPI on 2026-10-22 and brotlicffi 1.2.1.0 on 2026-10-23.
MITRE ATT&CK techniques by tactic:
Collection
Execution
T1059 Command and Scripting Interpreter; T1203 Exploitation for Client Execution
Privilege Escalation
T1068 Exploitation for Privilege Escalation
Initial Access
T1189 Drive-by Compromise; T1190 Exploit Public-Facing Application
Credential Access
T1212 Exploitation for Credential Access
Impact
T1499 Endpoint Denial of Service; T1499.004 Application or System Exploitation
Remediation
Patches
- Brotli 1.2.1 (PyPI)
- brotlicffi 1.2.1.0 (PyPI)
- Upstream google/brotli fix commits 0ed4268, 50a9b70, b418fa8, da98063 (releases v1.0.10, v1.1.1, v1.2.1)
- Node.js 22.23.4, 24.22.1, 26.12.1 for the related Node2Shell flaw
Immediate actions
- Upgrade with: pip install -U "Brotli>=1.2.1" "brotlicffi>=1.2.1.0"
- Inventory environments (including container images and lockfiles) that install Brotli or brotlicffi, directly or via requests[brotli]/httpx[brotli]/urllib3[brotli]
- Reject Content-Encoding: br on inbound requests at the proxy/WAF layer where Brotli request bodies are not required
Workarounds
- Uninstall Brotli and brotlicffi if Brotli decoding is not needed
- Strip br from outbound Accept-Encoding headers so clients do not receive Brotli responses
- Reject Content-Encoding: br at the infrastructure layer
Longer-term hardening
- Track advisory GHSA-9v8h-qqgm-4m35 and re-run pip-audit/Dependabot/Safety once the CVE is mapped to PyPI packages
- Treat decompression of untrusted network input as a security boundary and monitor workers for unexpected crashes or segfaults
- Pin and rebuild base images and lockfiles so patched Brotli versions propagate to all services
Affected and fixed versions
- Google / PyPI — Brotli (PyPI)
Vulnerable versions: >=1.0.3, <1.2.1
Fixed in: 1.2.1 - PyPI — brotlicffi
Vulnerable versions: >=1.0.3, <1.2.1.0 (<=1.2.0.x)
Fixed in: 1.2.1.0 - Python ecosystem — urllib3, requests, httpx, aiohttp, Scrapy (exposed when Brotli/brotlicffi is installed)
Vulnerable versions: Any version with a vulnerable Brotli/brotlicffi installed
Fixed in: Same versions with Brotli>=1.2.1 / brotlicffi>=1.2.1.0 - OpenJS Foundation — Node.js (related Node2Shell flaw)
Vulnerable versions: 22.x < 22.23.4; 24.x < 24.22.1; 26.x < 26.12.1
Fixed in: 22.23.4; 24.22.1; 26.12.1
Timeline
Last updated · 8 updates · revalidated 8× · latest source
Showing the 20 most recent tracked events.
- Research name expanded from Node2Shell to HTTP2Shell to reflect wider HTTP-stack impact; PYSEC-2026-4322 (Brotli) and PYSEC-2026-4323 (brotlicffi) advisories created.
- Phoenix Security reports no confirmed in-the-wild exploitation; CISA SSVC lists exploitation none, automatable no, technical impact total.
- Upstream github.com/andybalholm/brotli (Go) patch released in v1.2.7 (commit 33c2a98).
- Aikido Security and OpenSourceMalware publish that Python packages Brotli and brotlicffi are also vulnerable (Python2Shell); pip-audit, Dependabot and Safety do not yet flag affected versions.
- Imperva publishes analysis and a working RCE proof of concept for the Node.js variant (Node.js 24.22.0, Linux arm64); no in-the-wild exploitation reported.
- brotlicffi 1.2.1.0 released to PyPI; GHSA reviewed and updated.
- Ruby gem 0.9.1, PHP extension 0.21.1, UEFITool A76 and Ubuntu patches released.
- NVD record still Awaiting Analysis; CVE not in CISA KEV and no in-the-wild attacks confirmed.
- mitmproxy 12.3.1 released with the fixed Brotli decoder.
- Azure WAF emergency release published alongside Cloudflare's, per Phoenix Security.
- Cloudflare emergency WAF release adds two Log-mode Managed Ruleset rules: Brotli request Content-Encoding and Next.js /_next/image.
- ClickHouse fix merged (PR 127419) without a patched release; Apache Arrow tracking issue 55166 remains open.
- .NET runtime and SDK updates begin rolling out for the Brotli segmentation fault (dotnet/runtime issue 136422).
- JFrog (Engelberg, Tsalolikhin, Ouzan) publishes Brotli2Shell research showing the flaw also affects FFmpeg via libjxl (memory corruption), .NET HttpClient/ASP.NET Core (native segfault), ClickHouse (crash via one 23 MB br request) and Apache Arrow/pyarrow (endless decode loop).
- Sweet Security confirms the native Go Brotli decoder (v1.2.6) panics with 'index out of range [8] with length 8' on a crafted Brotli request, affecting Traefik, Iris, fasthttp and Fiber (DoS, not RCE).
- Git for Windows 2.56.0.windows.4 replaces builds (2.56.0.windows.2/.3) that bundled libcurl with unpatched Brotli 1.2.0.
- Microsoft releases out-of-band .NET security updates 8.0.33, 9.0.22, 10.0.14 and 11 RC3 for CVE-2026-111497; exposure requires non-default Brotli decompression (ASP.NET Core request decompression, HttpClient, System.IO.Compression).
- BleepingComputer reports emergency patches including .NET (with privilege escalation reported on affected .NET systems); the Broccoli2Shell tracking portal lists DuckDB, Apache Arrow (bundled), 7-Zip-zstd, p7zip, EDK II and woff2 (Makefile build) as still unfixed.
- SOCRadar reports no in-the-wild exploitation and the CVE is not in CISA KEV; pyarrow remains unfixed; a public GitHub PoC probe is available.
- CISA adds CVE-2026-111497 to the Known Exploited Vulnerabilities Catalog, citing BOD 26-04. The alert gives no actor, campaign details, IOCs or due date.
Update history
- 2026-10-27 — CISA KEV Adds CVE-2026-48356 (Adobe Commerce/Magento Unrestricted File Upload) and CVE-2026-111497 (Google Brotli Decoder Unchecked Return Value / Out-of-Bounds Write): What changed Exploitability POC_PUBLIC - ACTIVE following the CISA KEV listing on 2026-10-27. Severity (CRITICAL) and status (ACTIVE) are already at their maximum and are unchanged.
- 2026-10-27 — CVE-2026-111497: Node.js Brotli Decoder Out-of-Bounds Write Threatens Remote Code Execution Across All Supported Versions: What changed No field changes. New indicators (2) Indicator values are withheld at this access level. New timeline 2 downstream fix events: mitmproxy 12.3.1 (2026-10-25) and Git for Windows 2.56.0.windows.4 (2026-10-26).
- 2026-10-26 — Critical Brotli decoder out-of-bounds write (CVE-2026-111497, Broccoli2Shell / HTTP2Shell) - Microsoft emergency .NET patches: What changed No field escalation: severity CRITICAL, CVSS 9.2 and exploitability POC_PUBLIC are unchanged and the report confirms no in-the-wild exploitation and no CISA KEV listing.
- 2026-10-26 — Critical 'HTTP2Shell' / Broccoli2Shell Brotli decoder out-of-bounds write (CVE-2026-111497) affecting Google Brotli, Node.js and Python clients: What changed No severity, exploitability or status change. Severity stays CRITICAL (CVSS 4.0 9.2), exploitability POC_PUBLIC. New indicators (5) Indicator values are withheld at this access level.
- 2026-10-26 — Node2Shell: Brotli Out-of-Bounds Write (CVE-2026-111497) Affects Python Brotli/brotlicffi Packages: What changed No change to severity (CRITICAL), CVSS (9.2) or exploitability (POC_PUBLIC). The newer report lists status as MONITORING, which is not an escalation, so the existing ACTIVE value is kept.
- 2026-10-26 — Brotli Decoder Out-of-Bounds Write (CVE-2026-111497, 'Node2Shell' / 'HTTP2Shell') and Cloudflare Emergency WAF Rules: What changed No severity, exploitability or status change warranted. Still no confirmed in-the-wild exploitation and not in CISA KEV. New indicators (6) Indicator values are withheld at this access level.
- 2026-10-26 — HTTP2Shell (CVE-2026-111497) Extends Beyond HTTP, Affecting Brotli Consumers Including .NET, FFmpeg, ClickHouse, and Apache Arrow: What changed Scope expands beyond Python/Node/Go: the same Brotli block-switch bug is shown to affect .NET, FFmpeg/libjxl, ClickHouse and Apache Arrow/pyarrow. No change to severity, exploitability or status.
- 2026-10-25 — HTTP2Shell (CVE-2026-111497): Brotli decoder out-of-bounds write also affects native Go implementations: What changed No severity, exploitability, status or CVSS change warranted.
Sources cited
- GitHub Advisory GHSA-9v8h-qqgm-4m35 GitHub · Advisory · 2026-10-22
- Python Packages Vulnerable to Node2Shell - OpenSourceMalware opensourcemalware.com · Research · 2026-10-23
- Node.js Brotli Decoder Out-of-Bounds Write (RCE) - OX Security ox.security · Research · 2026-10-22
- Node.js security advisory: Brotli decoder RCE (CVE-2026-111497) - Vercel vercel.com · Vendor report · 2026-10-21
- Node2Shell: From Brotli Data to Remote Code Execution - Imperva imperva.com · Proof of concept · 2026-10-23
- Python packages are also vulnerable to the Node2Shell Brotli flaw (CVE-2026-111497) - Aikido aikido.dev · Blog · 2026-10-23
- Node2Shell: Fixed Node.js Versions and Check - Brandefense brandefense.io · Blog · 2026-10-22
- Node2Shell: Node.js Brotli Flaw Gets RCE Proof of Concept - Cyber Kendra cyberkendra.com · News · 2026-10-23
Other reports on CVE-2026-111497
- Node.js November 2026 Security Releases Patch 16 Vulnerabilities (HTTP/2 crashes, HTTPS heap/TLS key leak CVE-2026-123864, TLS client-certificate auth bypass)
- Apple Bluetooth/AirPlay Pairing Vulnerabilities Patched Across Apple Platforms (CVE-2026-113968, CVE-2026-113969, CVE-2026-113964, CVE-2026-113965, CVE-2026-113970)
- PHP2Shell (CVE-2026-109618, CVE-2026-109619) and Node2Shell (CVE-2026-111497) exploited vulnerabilities; Insignary-Chk detection tool released
- Multi-vendor vulnerability roundup: Node2Shell Brotli RCE (CVE-2026-111497, actively exploited, CISA KEV), WatchGuard CVE-2026-98432 (CVSS 9.8) and AuthPoint Gateway flaws, Cisco UCS Central CVE-2026-76506, SonicWall GMS CVE-2026-109593/109594 unpatched (EOL)
- Cybersecurity Black Week: LiteLLM 1.107.0 PyPI/Docker supply-chain compromise, PHP2Shell (CVE-2026-109618/109619), Node2Shell (CVE-2026-111497), GitLab CVE-2026-110264, KSMBD flaws and eMudhra emSign intermediate CA key compromise
- CISA KEV adds Google Brotli (CVE-2026-111497, Node2Shell) and Adobe Commerce/Magento (CVE-2026-48356, PolyShell) flaws
Previous and next in vulnerability
Drafted by the Threadlinqs research pipeline from 8 sources; published ; last updated .