The Wire · Showcase
DJANGO PATCHES HEADER PARSING VULNERABILITY AFFECTING CACHE AND SECURITY
By RepoJournal · Filed · About Django
Django shipped a critical fix for CVE-2026-48587 that rewrites how the framework parses HTTP header values, closing a whitespace-handling gap that could leave tokens improperly sanitized.
The security fix [1] extracts repeated split-and-strip logic into a new `split_header_value()` generator in django/utils/http.py. The old `cc_delim_re` regex only stripped whitespace around the comma delimiter itself, leaving leading or trailing whitespace intact on first and last tokens. RFC 9110 compliance means every token gets fully stripped now, not just the edges around delimiters. This matters because improper header parsing can cascade through cache headers, content-type values, and any comma-separated header field your app touches. In parallel, Django optimized DBCache culling [2] to run only every n queries instead of every query, a performance win for apps hammering the database cache layer. The team also fixed test isolation bugs [3] where cached Site instances were leaking database hints across test boundaries, causing unexpected writes to alternate databases. These aren't flashy features, but they're the kind of foundational fixes that prevent production surprises.
One email a day. Unsubscribe in one click.
Keep up with Django in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review your custom header parsing code against the new split_header_value() helper django/django [plan]
- → Evaluate DBCache cull_frequency parameter in your settings if you're using database-backed caching django/django [monitor]
- → Pull the latest test isolation fixes if you maintain large test suites django/django [plan]
References
- [1] Refs CVE-2026-48587 -- Added helper to properly split header values. django/django
- [2] Fixed #32785 -- Optimize cull frequency for DBCache. ↗ django/django
- [3] Refs #16281 -- Fixed isolation of admin_views.ViewOnSiteTests. django/django