{"id":"PYSEC-2026-4322","summary":"Out-of-bounds write in the Brotli decoder (\"Node2Shell\") also affects the PyPI Brotli package","details":"CVE-2026-111497 (\"Node2Shell\") is an out-of-bounds write (CWE-787) in Google's\nBrotli decoder (c/dec/decode.c). DecodeBlockTypeAndLength() returns an ambiguous\nvalue for an invalid block switch, and the fast decode path discards it\n(CWE-252, unchecked return value), so a crafted Brotli stream makes the decoder\ncontinue on corrupted state and write past the ring buffer. Upstream rates it\nCVSS 4.0 9.2 and classifies the impact as potential remote code execution.\n\nThe vulnerability is in Google's C library, not in Node.js specifically. The\nPyPI `Brotli` package is Google's CPython binding and compiles the same\nc/dec/decode.c that has the actual vulnerability. All `Brotli` releases up to\nand including 1.2.0 ship the vulnerable decoder; 1.2.1 contains the upstream\nfix (commit 0ed4268a) and differs from 1.2.0 only in that fix plus a version\nbump.\n\nThe decoder is reached whenever untrusted Brotli data is decompressed. With\n`Brotli` installed, common HTTP clients decode Brotli responses automatically\n(urllib3/requests, httpx with the brotli extra, aiohttp) and services that\naccept `Content-Encoding: br` request bodies decode inbound data, so the flaw\nis reachable from attacker-controlled input.\n","aliases":["BIT-node-2026-111497","BIT-node-min-2026-111497","CVE-2026-111497","PYSEC-2026-4323"],"modified":"2026-10-23T13:40:35.253748907Z","published":"2026-10-23T00:00:00Z","references":[{"type":"FIX","url":"https://github.com/google/brotli/commit/0ed4268a4401abcb4472096340477cf4af7d1a2b"},{"type":"ADVISORY","url":"https://www.cve.org/CVERecord?id=CVE-2026-111497"},{"type":"WEB","url":"https://opensourcemalware.com/blog/node2shell-affects-python"},{"type":"WEB","url":"https://nodejs.org/en/blog/vulnerability/october-2026-security-releases"},{"type":"WEB","url":"https://github.com/google/brotli/releases/tag/v1.2.1"},{"type":"PACKAGE","url":"https://pypi.org/project/Brotli/"}],"affected":[{"package":{"name":"brotli","ecosystem":"PyPI","purl":"pkg:pypi/brotli"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}],"versions":["0.5.2","0.6.0","1.0.1","1.0.4","1.0.6","1.0.7","1.0.8","1.0.9","1.1.0","1.2.0"],"database_specific":{"source":"https://github.com/pypa/advisory-database/blob/main/vulns/brotli/PYSEC-2026-4322.yaml"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}