Brotli needs patching in Node, Python and curl, Roc nears C, and uv check runs ty

2 hours ago

A flaw in Google's Brotli decoder lets one crafted stream take over a server or the client that fetched it, and it reaches Node, Python, Bun, curl and Envoy. Also from Saturday's Hacker News front page: Roc compressing within a tenth of libdeflate's speed, uv check running ty, and twelve years of rqlite. Node2Shell evolves to HTTP2Shell, blast radius affects many HTTP libs and apps, by Dania Durnas at Aikido https://www.aikido.dev/blog/python-packages-vulnerable-node2shell-brotli-cve-2026-111497 Discussion: https://news.ycombinator.com/item?id=50219177 anttihaapala on finding Brotli absent from their Python deployments: https://news.ycombinator.com/item?id=50222420 How close can pure functional programming get to C?, by Richard Feldman https://rtfeldman.com/fp-vs-c Discussion: https://news.ycombinator.com/item?id=50218195 rtfeldman on roc-deflate's output matching libdeflate's: https://news.ycombinator.com/item?id=50224165 Bringing uv and ty together, by Sara Sklenka at Astral https://astral.sh/blog/uv-ty-integration Discussion: https://news.ycombinator.com/item?id=50172962 xavdid on editor support for inline-metadata scripts: https://news.ycombinator.com/item?id=50218030 Twelve years of distributed SQLite, by Philip O'Toole https://philipotoole.com/twelve-years-of-distributed-sqlite/ Discussion: https://news.ycombinator.com/item?id=50217500 gregsadetsky on rqlite and explicit transactions: https://news.ycombinator.com/item?id=50225066 rqlite's FAQ on transactions: https://rqlite.io/docs/faq/#does-rqlite-support-transactions The front page that day: https://news.ycombinator.com/front?day=2026-10-24

Ask about this presentation

Chapters

  1. 0:00Brotli's decoder flaw
  2. 0:48Python apps without a Brotli import
  3. 1:27Fixed releases
  4. 2:03Roc against C
  5. 2:43uv check
  6. 3:25Twelve years of rqlite
Show transcript

Brotli's decoder flaw

One crafted Brotli stream can take over a server, or the client that fetched it

Brotli 1.0.3 to 1.2.0 out-of-bounds write in the decoder fixed in 1.2.1

On Saturday's Hacker News front page, the story to act on is a flaw in Brotli, Google's compression library, which sits inside most software that speaks HTTP. A crafted Brotli stream overflows a buffer in the decoder, and it works in both directions. A malicious client can take over an unpatched server, and a malicious server can take over a client that accepts compressed responses. Every version from 1.0.3 to 1.2.0 is affected. The fix went into Brotli's source in February, but it stayed unreleased until the flaw was disclosed in October, so every project that bundles its own copy has to ship its own update.

Python apps without a Brotli import

A Python app can be exposed without ever importing Brotli

requests → urllib3 → Brotli ≤ 1.2.0  # if installed
httpx[brotli]      → Brotli ≤ 1.2.0
aiohttp            → Brotli ≤ 1.2.0

$ pip show Brotli brotlicffi

Python is the easy one to miss. Requests, httpx and aiohttp decode Brotli automatically whenever the package is installed, so an app can be reached through a webhook delivery, a link preview or a crawler, with no Brotli import anywhere in its own code. As of October 23, the advisory databases had yet to map the flaw to either Python package, so pip-audit and Dependabot stay quiet, and the check is by hand. Commenter anttihaapala went through every Python deployment and found zero with it installed, because those clients treat Brotli as optional.

Fixed releases

Patch the runtime, then rebuild every image that bundles it

Node.js22.23.4 · 24.22.1 · 26.12.1
Bun1.4.4
PythonBrotli 1.2.1 · brotlicffi 1.2.1.0
libbrotli1.2.1 · 1.1.1 · 1.0.10
Envoy1.40.0 · 1.39.3 · 1.38.6 · 1.37.8
Until then · reject br request bodies at the proxy, and turn off Brotli decoding on outbound calls

Node, Bun, Envoy and the Python packages all have fixed releases, and curl needs its Brotli dependency updated. A container image built on an old copy stays vulnerable until it is rebuilt. Until then, reject Brotli request bodies at the proxy. Removing Brotli from the accept header leaves outbound calls exposed, because a malicious server can send a Brotli response anyway, so turn the decoder off for those. Apache and nginx leave Brotli decoding off by default.

Roc against C

Roc compresses at nearly C speed with every bounds check still on

2.6%
median slowdown against libdeflate · M1 MacBook Pro
8.9%
median slowdown against libdeflate · Ryzen 9 3900X
Same
compressed output, byte for byte

That Brotli bug is an unchecked memory write, and Roc code can't make one. Roc is a functional language with no way to skip a bounds check, and Richard Feldman tuned roc-deflate, a compression package written in it, to race libdeflate, the hand-tuned C library. In the median case Roc runs less than a tenth slower, and on some files it is faster. When a commenter asked whether the compression itself was as good, the author, rtfeldman, replied that the output is identical. Roc is still weeks from its first numbered release, and C keeps the higher ceiling.

uv check

uv check installs your dependencies and type-checks the project with ty

$ uv check                        # whole project
$ uv check --all-packages         # every workspace package
$ uv check --script example.py    # a script's own deps
experimental uv 0.12.3 or later ty 0.0.76 or later

For Python projects, Astral has wired its type checker, ty, into uv. One command prepares the environment, installs the dependencies and type-checks the code, with the ty version pinned in the lockfile, so CI and every laptop run the same checker. Single-file scripts that declare their dependencies inline now get completions and go-to-definition in the editor too. Commenter xavdid called bad editor support the biggest complaint about those scripts. It is experimental, and the editor setup is opt-in, because installing dependencies can run third-party code.

Twelve years of rqlite

rqlite has replicated SQLite through a Raft log since 2014

Consensus
rqlite · dqlite
One leader, a cluster, no wait to restore
Streaming
Litestream
One machine, its log copied to S3
Merge
cr-sqlite
Many writers, merged later

Philip O'Toole looked back on twelve years of rqlite, which puts every SQLite write through a Raft log so that losing a node doesn't lose the data. About a dozen projects followed it, and they split three ways. Consensus keeps a cluster, streaming copies one machine's log to S3, and merging lets many writers diverge. The money went to the hosted versions, and Supabase bought Turso this year. Commenter gregsadetsky points out that rqlite officially leaves explicit begin and commit unsupported, and runs a bulk request as all or nothing instead. If a restore from S3 is fast enough, I'd run Litestream, and if the app can't wait for one, rqlite.

Up next

3:59

Claude proves 123 libraries' fuzz tests can't crash, Kimi K3.1 Pro, and Docker is weird

@hacker-news · 1 day ago

4:04

eMudhra's CA key was 4, mitmproxy intercepts anything still trusting it, Quad9 leaves France

@hacker-news · 2 days ago

4:04

PHP patches two RCE bugs, eMudhra’s CA key was the number 4, and LiteLLM shipped a stealer

@hacker-news · 3 days ago

3:33

eMudhra’s one-byte CA keys, DeepSeek’s open DeepInfer engine, and WhatsApp’s hidden chatbot orders

@hacker-news · 4 days ago

4:15

MiniMax M3.1 Flash cuts agent costs by 70%, Timestral forecasts on a CPU, and Wine reaches OpenBSD

@hacker-news · 5 days ago

3:21

DeepSeek's $0.75 search API for agents, Lean's five-kernel proof check, and Pele

@hacker-news · 6 days ago

3:32

DeepSeek V4.1 Flash reasons less for the same answers, llmspeed, and a web app built in Lean 4

@hacker-news · 1 week ago

4:11

Claude traced NIST’s P-256 seed to a 1997 timestamp, Muse Spark Open runs on four Mac Studios, and UTC drops leap seconds

@hacker-news · 1 week ago

3:37

Muse Spark Open runs on two Mac Studios, ads that deliver spyware, and a Wi-Fi bug TCP can’t see

@hacker-news · 1 week ago

3:38

Android 17's libc stops at the first emoji, AI agents escape through a package mirror, and pg_vectorsearch

@hacker-news · 1 week ago

4:25

Anthropic replaced git with Scion, Gemini 4 Argon, and an 11-year-old hole in Rust’s borrow checker

@hacker-news · 1 week ago

3:17

Google ads now allow fingerprinting, QGIS bans AI code, and Gran Turismo 4 in WebAssembly

@hacker-news · 1 week ago

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️