What do hackers already know about your business? Get Your Free Report
Node2Shell: Brotli Flaw Hits Python Packages
Updated 12 Mins Read
Summarize with:

Node2Shell: Brotli Flaw Hits Python Packages

[Update] October 28, 2026: CISA Adds Node2Shell to KEV as Exploit Traffic Emerges

[Update] October 27, 2026: PHP Ships Windows Builds With Brotli Fix

The Node2Shell Brotli flaw (CVE-2026-111497), disclosed alongside Node.js fixes on October 21, 2026, also reaches Python through the PyPI Brotli and brotlicffi packages. Both compile Google’s vulnerable Brotli C decoder, and popular HTTP clients such as requests, httpx and aiohttp use them to decompress responses automatically once they are installed.

That makes exposure easy to miss. A Python service can hand attacker-controlled Brotli data to the decoder without a single Brotli import in its own code. At this time, researchers have already shown Remote Code Execution (RCE) against Node.js through the same decoder code, so Python teams should move to the fixed versions, Brotli 1.2.1 and brotlicffi 1.2.1.0, without waiting.

Key Takeaways

  • Shared Decoder Bug: CVE-2026-111497 is an out-of-bounds write in Google’s Brotli C decoder, versions 1.0.3 through 1.2.0, scored 9.2 under CVSS v4.0
  • Python Exposure: PyPI Brotli 1.2.0 and earlier and brotlicffi 1.2.0.x and earlier bundle the flawed decoder; the fixed versions are Brotli 1.2.1 and brotlicffi 1.2.1.0
  • Silent Path: urllib3, requests, httpx and aiohttp decode Brotli automatically when a backend is installed, so applications can be exposed without calling Brotli directly
  • Exploitation Status: CISA added CVE-2026-111497 to the KEV catalog on October 27, 2026. Observed exploit traffic targets Node.js; no exploitation through the Python packages has been reported
  • Next Step: Upgrade, rebuild images and restart long-running workers so the patched extension actually loads

CISA Adds Node2Shell to KEV as Exploit Traffic Emerges

CISA added CVE-2026-111497 to its Known Exploited Vulnerabilities (KEV) catalog on October 27, 2026, together with the Adobe Commerce and Magento flaw CVE-2026-48356 (PolyShell). FCEB agencies must remediate by November 10, 2026. The listing replaces the “no in-the-wild exploitation” status this post gave as of October 26.

The reported activity targets Node.js. Captured exploit traffic carried a payload built for the official Node.js 24.22.0 x86-64 binary, with a delivery layer copied from public proof-of-concept code. When researchers replayed the attacker’s chain in a lab, it produced no shell in 50 attempts: it triggered the bug and crashed the process but never reached its final execution step, which they assessed as a first-generation attempt with a defective last stage. The source IP, 94[.]154[.]43[.]7, has also been tagged for PHP2Shell exploitation. Separate honeypot telemetry logged one attempt from a U.S. IP on October 27, with no evidence that the target was vulnerable or that the attempt succeeded.

No exploitation through the Python Brotli or brotlicffi packages has been reported. The KEV listing covers the CVE as a whole, so the upgrade, rebuild and restart steps in this post now carry a federal deadline.

CVE-2026-111497 at a Glance

The table below summarizes the Node2Shell vulnerability as it applies to Python environments.

AttributeDetails
CVE IDCVE-2026-111497
Common NamesNode2Shell, also HTTP2Shell and Brotli2Shell
WeaknessCWE-787 (Out-of-Bounds Write), CWE-252 (Unchecked Return Value)
Severity9.2 Critical (CVSS v4.0, Google as CNA); 8.1 (CVSS v3.1, a Linux distribution advisory and the .NET advisory)
Affected Upstream VersionsBrotli 1.0.3 through 1.2.0
Affected Python PackagesBrotli 1.2.0 and earlier; brotlicffi 1.2.0.x and earlier
Fixed VersionsUpstream Brotli 1.0.10, 1.1.1 and 1.2.1; PyPI Brotli 1.2.1; brotlicffi 1.2.1.0
Python AdvisoriesPYSEC-2026-4322 (Brotli), PYSEC-2026-4323 (brotlicffi)
Exploitation StatusExploit attempts observed against Node.js; none reported against the Python packages
CISA KEVAdded October 27, 2026 (FCEB due date: November 10, 2026)
Reported ByKhai Tran and Sylvie Mayer, OpenAI Codex Security

What Is the Node2Shell Brotli Vulnerability?

Node2Shell is the most widely used name for CVE-2026-111497, a memory safety flaw in the decoder of Google’s Brotli compression library. Its CVE record says a remote, unauthenticated attacker can use a crafted Brotli stream to corrupt adjacent decoder memory, with possible information disclosure, denial of service or arbitrary code execution.

Details of CVE-2026-111497 (SOCRadar Vulnerability Intelligence)
Details of CVE-2026-111497 (SOCRadar Vulnerability Intelligence)

Google, acting as the CVE Numbering Authority (CNA), published the record on October 22, 2026, with a CVSS v4.0 score of 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). The Node2Shell name comes from researchers who demonstrated code execution against Node.js.

What Causes the Out-of-Bounds Write?

The bug sits in block switch handling in the decoder source file c/dec/decode.c. The DecodeBlockTypeAndLength() function returned an ambiguous result for an invalid block switch, and the fast decoding path ignored that return value. As the Node.js security release explains, the streaming decoder then treated a permanent format error as a temporary need for more input and kept appending bytes to an eight-byte internal buffer.

The upstream fix adds a dedicated error code, BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH (-17), so decoding stops on the malformed stream. The change entered Brotli’s source in February 2026 but reached tagged releases only on October 21, 2026, as Brotli 1.0.10, 1.1.1 and 1.2.1.

Why Does Node2Shell Affect Python Packages?

Python inherits the flaw because two PyPI packages compile Google’s C decoder into native extensions. Brotli is Google’s official CPython binding, and brotlicffi is a CFFI-based binding often used on PyPy. The PYSEC-2026-4322 advisory notes that Brotli 1.2.1 contains the upstream fix and otherwise differs from 1.2.0 only by a version bump.

The Brotli package alone draws over 82 million downloads a month, and it often arrives as a transitive dependency or optional extra that teams never chose directly.

Which Python Package Versions Are Affected?

Every release of both packages before the fixed versions is affected. Both fixes were published on PyPI on October 22, 2026, and the PyPI advisory database added entries for them on October 23.

PackageRoleAffected VersionsFixed VersionAdvisory
BrotliGoogle’s CPython binding1.2.0 and earlier1.2.1PYSEC-2026-4322
brotlicffiCFFI binding, common on PyPy1.2.0.x and earlier1.2.1.0PYSEC-2026-4323

A community analysis found that no advisory database listed the PyPI packages immediately after disclosure, so dependency scans run before October 23 may have missed them. Distribution-packaged Python bindings follow their own versioning and may carry backported fixes, so check the relevant Linux vendor advisory.

How Can Attackers Reach the Brotli Decoder in Python?

Exploitation requires a path that delivers attacker-controlled Brotli data to the decoder. The flaw works in both directions: a malicious server can target a vulnerable client, and a malicious client can target a vulnerable server.

Outbound HTTP Responses

Once Brotli or brotlicffi is installed, urllib3 and requests decode Brotli responses automatically, httpx does so with its brotli extra, and aiohttp does so when Brotli is present. Services that fetch attacker-influenced URLs, such as webhook senders, link previewers, crawlers and Scrapy-based scrapers, are the most direct targets.

Inbound Request Bodies

Applications or middleware that decompress request bodies sent with Content-Encoding: br pass client-supplied data straight to the decoder. This path depends on the framework and its configuration, so teams should confirm whether any proxy, middleware or handler decodes Brotli bodies.

Bundled Decoders Outside the PyPI Packages

Some Python libraries ship their own Brotli copy. Apache Arrow pins a bundled Brotli 1.0.9, and its tracking issue was still open on October 26, 2026. Further research showed a 534-byte input sending pyarrow into an endless loop with no network connection involved, and upgrading the Brotli package does not patch such embedded copies.

Has Node2Shell Been Exploited in the Wild?

CISA added CVE-2026-111497 to its Known Exploited Vulnerabilities (KEV) catalog on October 27, 2026, superseding the October 23 SSVC “exploitation: none” assessment. Observed exploit traffic actively targets Node.js environments.

Is There a Public PoC for CVE-2026-111497?

Public exploit code for Node.js is available, and researchers confirmed it gets a shell on vulnerable builds; payloads are build-specific.

Red Hat states that the attack complexity is rated high, partly because of platform hardening such as ASLR and NX. Published research demonstrates impact, which is not the same as a reliable, weaponized exploit.

For Python specifically, no public research has shown memory corruption or code execution in the Brotli or brotlicffi extensions. The concern comes from the shared decoder code that already produced code execution on Node.js.

What Have Researchers Demonstrated?

Results differ by platform, and the strongest evidence comes from Node.js:

  • Node.js: Researchers ran code on the official Node.js 24.22.0 Linux arm64 image through fetch() responses and Express 5 or body-parser 2 request bodies; the proof took multiple attempts and did not succeed every time
  • Python: The community analysis built Brotli 1.2.0 and 1.2.1 with AddressSanitizer; 1.2.0 accepted a crafted stream of about 23 MB and kept asking for more input, while 1.2.1 rejected it with error -17, and memory corruption was not pursued
  • Other Software: Separate testing crashed a ClickHouse server with a single 23 MB request, gained instruction pointer control in FFmpeg through libjxl, and caused a native crash in a .NET test program

Severity ratings diverge as well. Microsoft’s .NET advisory scores the flaw 8.1 under CVSS v3.1 and lists information disclosure, denial-of-service (DoS) and elevation of privilege, not RCE.

PHP Ships Windows Builds With Brotli Fix

On October 26, 2026, the PHP team published updated Windows builds that bundle Brotli 1.2.1 and fix CVE-2026-111497: PHP 8.5.12-1, 8.4.27-1, 8.3.36-1 and 8.2.35-1. PHP joins the runtimes listed in this post that ship their own copy of the decoder and need an update separate from the Python packages.

In PHP for Windows, the vulnerable decoder is reachable through the cURL extension when automatic HTTP response decompression is enabled. cURL leaves this off by default, but applications and HTTP client libraries can turn it on. That puts PHP services fetching attacker-influenced URLs in the same risk category as the Python services described under Outbound HTTP Responses.

The -1 suffix marks a Windows package rebuild with updated dependencies. The PHP source and runtime versions are unchanged, so a version string alone does not separate patched and unpatched Windows builds; confirm the -1 package is installed. 

These builds are unrelated to the PHP2Shell fixes for CVE-2026-109618 and CVE-2026-109619, which PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 already include.

Which Other Runtimes Need a Patch?

Python services often run beside components that bundle their own decoder, and each needs a separate update. Exposure depends on whether the component decodes untrusted Brotli data.

ProductFixed InExposure Condition
Node.js22.23.4, 24.22.1, 26.12.1Applications decompress untrusted Brotli data with node:zlib
.NET8.0.33, 9.0.22, 10.0.14, 11.0 RC3Brotli enabled in ASP.NET Core request decompression or HttpClient, or BrotliStream/BrotliDecoder used on untrusted data
Envoy1.40.0, 1.39.3, 1.38.6, 1.37.8, 1.36.12Brotli decompressor configured
Istio1.31.2, 1.30.6, 1.29.9Brotli decompression enabled, for example through an EnvoyFilter
PHP for Windows8.5.12-1, 8.4.27-1, 8.3.36-1, 8.2.35-1 (Brotli 1.2.1)cURL extension with automatic HTTP response decompression enabled (off by default)
Apache Arrow (including pyarrow)No fix as of October 26, 2026Bundled Brotli 1.0.9 decodes Brotli-compressed data in pyarrow

Linux distributions are shipping Brotli updates on separate schedules, so check each vendor’s security tracker.

How to Check if Your Python Environment Is Affected

Brotli rarely appears in a top-level requirements file, so the inventory has to cover every place Python runs:

  • Find Installed Versions: Run pip show Brotli brotlicffi in every virtual environment, container image, CI runner and serverless layer
  • Trace Dependencies: Use pipdeptree -r -p Brotli to see which packages pulled Brotli in
  • Scan With Current Data: Run pip-audit, which draws on the PyPI advisory data where both packages are now listed
  • Look for Embedded Copies: Inventory pyarrow, Node.js binaries, Envoy sidecars and other components that compile their own Brotli

Patch and Upgrade Steps for Brotli and brotlicffi

Upgrading the two packages closes the most common Python path, but only if every running process loads the fixed build:

  • Upgrade with pip install -U “Brotli>=1.2.1” “brotlicffi>=1.2.1.0”
  • Set those minimum versions in requirements files and regenerate lockfiles
  • Rebuild container images and wheels that bundle either package, then redeploy
  • Restart long-running workers and services, since a running process keeps the old extension in memory

Patch services that fetch untrusted URLs or accept compressed request bodies first. Afterward, confirm the version each running process actually loads.

How SOCRadar Can Help

A shared library flaw gets fixed across packages, runtimes and distributions at different speeds, which makes status tracking the hard part. SOCRadar helps security teams identify exposure and track patches across their environments through several key capabilities:

  • Vulnerability Intelligence and CVE Radar: Track CVE-2026-111497 as upstream releases, vendor advisories, PoC availability and CISA KEV status change, so teams can reprioritize without checking dozens of advisories by hand.
  • Attack Surface Management: Discover internet-facing assets built on affected technologies, such as Node.js services or Envoy proxies, so patching starts with the most exposed entry points.
  • Supply Chain Intelligence: Monitor third-party vendors and suppliers whose products may bundle the vulnerable decoder, as their advisories and patch status change.
  • Dark Web Monitoring: Get early warning if exploit code or targeting discussions for Node2Shell surface in underground channels.
SOCRadar’s Vulnerability Intelligence, Cyber Threat Intelligence module
SOCRadar’s Vulnerability Intelligence, Cyber Threat Intelligence module

Mitigations if You Cannot Patch Yet

These steps reduce exposure while an upgrade is pending, but none replaces the fixed versions:

  • Remove the Backend: Uninstalling Brotli and brotlicffi makes common HTTP clients fall back to gzip or deflate, though servers that send Brotli anyway may then cause errors
  • Block Inbound Brotli: Reject requests whose Content-Encoding includes br at the proxy or middleware layer, before any decoding
  • Refuse Outbound Brotli: Stop advertising br and reject Brotli responses before decoding, since dropping br from Accept-Encoding alone does not stop a malicious server from sending it

Detection and Hunting Considerations

Watch for unusually large inbound request bodies with Content-Encoding: br (the observed request was about 23 MB), unexplained Node.js process crashes, and traffic from 94[.]154[.]43[.]7. Restrict access to core dumps, since crashes can expose live session data.

Advanced Dark Web Monitoring

Yağmur Ernalbant

Yağmur is a Senior Content Development Specialist at SOCRadar, covering both breaking cybersecurity news and the broader issues behind it. Through articles and regular Radar roundups, she tracks vulnerabilities, cybercrime, dark web activity, and other developments across the threat landscape.

Intelligence in your inbox every Thursday.

Join 30,000+ security professionals reading SOCRadar research.

Subscribe