logoalt Hacker News

0xbadcafebee • today at 3:37 AM • 1 reply • view on HN

If you are using Python, you are affected if you use urllib3, requests, httpx, aiohttp, Scapy, and others, if they were installed when Brotli was also installed. You can mitigate by uninstalling brotli and brotlicffi, OR, strip `br` from Accept-Encoding on outbound AND reject `Content-Encoding: br` on inbound.

This is not a server-side issue (unless for some weird reason you're using Brotli decoding in your http request processing), it's client-side.

Thank you Paul for the write-up (https://opensourcemalware.com/blog/node2shell-affects-python)


Replies

cowlevel • today at 5:58 AM

HTTP requests can use content-encoding:br but this isn't normal in browsers so might not be implemented in many servers