  class URLValidator(RegexValidator):
      ul = '\u00a1-\uffff'  # Unicode letters range (must not be a raw string).
  
      # IP patterns
      ipv4_re = r'(?:25[0-5]|2[0-4]\d|[0-1]?\d?\d)(?:\.(?:25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}'
      ipv6_re = r'\[[0-9a-f:.]+\]'  # (simple regex, validated later)
  
      # Host patterns
      hostname_re = r'[a-z' + ul + r'0-9](?:[a-z' + ul + r'0-9-]{0,61}[a-z' + ul + r'0-9])?'
      # Max length for domain name labels is 63 characters per RFC 1034 sec. 3.1
 
</s>
    ipv4_re = r'(?:0|25[0-5]|2[0-4]\d|1\d?\d?|[1-9]\d?)(?:\.(?:0|25[0-5]|2[0-4]\d|1\d?\d?|[1-9]\d?)){3}'
  class URLValidator(RegexValidator):
      ul = '\u00a1-\uffff'  # Unicode letters range (must not be a raw string).
  
      # IP patterns
    ipv4_re = r'(?:0|25[0-5]|2[0-4]\d|1\d?\d?|[1-9]\d?)(?:\.(?:0|25[0-5]|2[0-4]\d|1\d?\d?|[1-9]\d?)){3}'
      ipv6_re = r'\[[0-9a-f:.]+\]'  # (simple regex, validated later)
  
      # Host patterns
      hostname_re = r'[a-z' + ul + r'0-9](?:[a-z' + ul + r'0-9-]{0,61}[a-z' + ul + r'0-9])?'
      # Max length for domain name labels is 63 characters per RFC 1034 sec. 3.1
keep keep keep keep replace keep keep keep keep keep
 Fixed CVE-2021-33571 -- Prevented leading zeros in IPv4 addresses.

validate_ipv4_address() was affected only on Python < 3.9.5, see [1].
URLValidator() uses a regular expressions and it was affected on all
Python versions.

[1] https://bugs.python.org/issue36384
django/core/validators.py