RepoJournal
Django

@django

Python's batteries-included web framework

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.

Pick a date

Topics: Python Full archive →

The Wire · Showcase

DJANGO PATCHES PASSWORD HASHER REGRESSION THAT BROKE NON-UTF8 INPUTS

By RepoJournal · Filed · About Django

Django shipped a critical fix for a bug introduced in recent versions where PBKDF2 and MD5 password hashers reject valid passwords containing non-UTF-8 bytes, breaking authentication for legitimate use cases.

The regression stems from an unnecessary `force_str()` call in the PBKDF2 hasher that raised `UnicodeDecodeError` on perfectly valid password values [1]. The MD5 hasher had the same issue, fixed by removing the UTF-8 validity constraint and concatenating with `force_bytes()` instead [2]. If you're using either hasher with binary password data or non-ASCII input, this patch restores functionality that broke in 78fac1b0473. In related fixes, Django also prevented `FileBasedCache.touch()` from raising `ValueError` when called on expired keys [3], eliminating a silent crash when cache maintenance runs on stale entries. Documentation got a precision update distinguishing "plaintext" from "plain-text" in password hasher docs to clarify whether `make_password()` expects UTF-8 encoded text or raw password material [4].

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] Fixed #37184 -- Allowed non-UTF-8 bytes passwords in the PBKDF2 and MD5 password hashers. ↗ django/django
  2. [2] Fixed #37184 -- Allowed non-UTF-8 bytes passwords in the PBKDF2 and MD5 password hashers. django/django
  3. [3] Fixed #37191 -- Prevented ValueError in FileBasedCache.touch() for expired keys. django/django
  4. [4] Clarified "plaintext" vs. "plain-text" in password hashers docs. ↗ django/django

Quick answers

What shipped in Django on June 27, 2026?
Django shipped a critical fix for a bug introduced in recent versions where PBKDF2 and MD5 password hashers reject valid passwords containing non-UTF-8 bytes, breaking authentication for legitimate use cases. In total, 5 commits and 4 pull requests landed.
Who contributed to Django on June 27, 2026?
2 developers shipped this update, including jacobtylerwalls and medmunds.
What were the notable Django updates?
Fixed #37184 -- Allowed non-UTF-8 bytes passwords in the PBKDF2 and MD5 password hashers, Fixed #37184 -- Allowed non-UTF-8 bytes passwords in the PBKDF2 and MD5 password hashers, and Fixed #37191 -- Prevented ValueError in FileBasedCache.touch() for expired keys.

More from @django

Daily updates, in your inbox

Follow Django

Keep up with Django in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?

We use privacy-friendly analytics (Google Analytics, IP-anonymized) to see which pages help readers. No ads, and we never sell your data. See our Privacy Policy.