When str.lower() is a security vulnerability in Python
7.4 relevance
Score Breakdown
technical depth 8
novelty 7
actionability 7
community 8
strategic 5
personal 9
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
Python security vulnerability with high community engagement, directly actionable for developers.
Summary
Python's `str.lower()` call in the IDNA 2003 implementation (via `str.encode('idna')`) introduces a security vulnerability because it uses the Unicode version shipped with the interpreter, not the Unicode 3.2.0 case-folding rules specified in RFC 3451's StringPrep. This mismatch can cause inconsistent domain name processing, enabling bypasses or attacks. The fix, tracked as CVE-2026-17084, creates explicit exceptions to force Unicode 3.2.0 behavior for affected codepoints, ensuring compliance with the IDNA 2003 spec.
Author
Seth Michael Larson