Case-folding

Python’s str.lower() Is a Security Vulnerability. Here’s What You’re Missing.

Python’s str.lower() seems harmless, but its deviation from Unicode’s full case-folding rules can create security vulnerabilities in authentication, domain validation, and other case-insensitive comparisons. Attackers exploit the gap between implementation and specification, turning a mundane method into an attack surface. Learn why .lower() isn’t safe for security checks and how to protect your code.