Research: str.lower() Can Be a Security Vulnerability in Python

jedisct1 · x · 2026-08-26

A technical post by Seth Larson reveals that Python's str.lower() method can pose a security vulnerability in specific contexts, such as handling StringPrep for IDNA 2003. The issue stems from inconsistencies in character case mapping due to different Unicode data versions shipped with Python interpreters. While IDNA 2008 is recommended, this inconsistency can be exploited by attackers when older standards are required.

Original post →

More from Safety

Safety channel →