Skip to content

Upgrading gunicorn 25 to 26

Breaking25.3.0 → 26.2.0Breaking4Security9New4Changed3Fixed22Other4

BreakingUpgrade verdict

4 breaking changes and 9 security fixes.

  • This is for deployments where TLS is terminated by a proxy that speaks HTTP/2 upstream, so the hop into gunicorn no longer drops to HTTP/1.1.
  • packaging is no longer a runtime dependency: it was only ever imported by the gevent worker, to compare gevent's version.
  • Eventlet worker removed: The eventlet worker class has been dropped.
  • On the ASGI worker with the fast parser, any request carrying an Upgrade header reached the application with an empty body, whatever the header's value and with HTTP/2 switched off entirely.
Top 5 of 13 that need code or config changes

Drops packaging.

Installs 0 packages in all (was 1).

Breaking4
This is for deployments where TLS is terminated by a proxy that speaks HTTP/2 upstream, so the hop into gunicorn no longer drops to HTTP/1.1.
forwarded_allow_ips
packaging is no longer a runtime dependency: it was only ever imported by the gevent worker, to compare gevent's version.
packaginggeventtesting
Eventlet worker removed: The eventlet worker class has been dropped.
eventletgeventgthreadtornado
On the ASGI worker with the fast parser, any request carrying an Upgrade header reached the application with an empty body, whatever the header's value and with HTTP/2 switched off entirely.
Upgradegunicorn_h1cfast
Security9
Cleartext HTTP/2 lands, and an HTTP/2 security fix.
HTTP2Request built its headers straight from the stream, so nothing the HTTP/1 path enforces applied over HTTP/2: the underscore and header_map policy, duplicate Host and Content-Type, control…
HTTP2Requestheader_mapHostContent-Typeforwarded_allow_ipsSCRIPT_NAME
If you serve HTTP/2, this is the reason to upgrade.
Dependency floors raised past known advisories: every declared floor was checked against the advisory database. tornado, h2, setuptools and pymdown-extensions permitted vulnerable versions and now…
tornadoh2setuptoolspymdown-extensionspytesthttpx
HTTP/1.1 Request-Target Validation (RFC 9112 sections 3.2.3, 3.2.4).
authority-formCONNECTasterisk-formOPTIONSrelative-reference
Header Field Hardening (RFC 9110).
Content-Length
Request Smuggling Hardening.
finish_body_body_receiver
PROXY Protocol (ASGI): Enforce proxy_allow_ips and tighten v1/v2 parsing in the ASGI callback parser.
proxy_allow_ips
Connection Draining: Drain the connection on close per RFC 9112 section 9.6 to prevent reset-on-close truncation.