Skip to navigation

Threat reportVulnerabilityTL-2026-4315

Python2Shell: Brotli decoder out-of-bounds write in PyPI Brotli/brotlicffi (CVE-2026-111497)

criticalACTIVE

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

IdentifiersTL-2026-4315, CVE-2026-111497, CVE-2026-115936
Also known asPython2Shell, Node2Shell
SeverityCRITICAL
CVSS9.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 statusLinked CVE exploited in the wild; Listed in CISA KEV: CVE-2026-111497 (added )
EPSSCVE-2026-111497: 82.6% (99.6th percentile)
Affected productsGoogle / 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
MalwarePython, httpclient - S0068
MITRE ATT&CK techniquesT1005 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
MotivationUNKNOWN
Target sectorstechnology, software development, cloud services, web services
Target regionsGlobal
Detection rules9 (1 shown free)
Sources8 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, Image

Microsoft 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, Commands

Sigma

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: high

Known 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.

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)
  • 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.

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

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

T1005 Data from Local System

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

Sources cited

Other reports on CVE-2026-111497

Previous and next in vulnerability

Drafted by the Threadlinqs research pipeline from 8 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