4 comments

  • echoangle29 minutes ago
    &gt; This is why calling str.lower() represents a difference in the implementation and the specification, and therefore a vulnerability:<p>I wish there was some explanation how this is a vulnerability and not just a bug generating erroneous data.<p>Vulnerability for me sounds like there’s a reasonable way to create an exploit from the bug, and I don’t see one here as someone who’s not very familiar with the topic.
    • SethMLarson24 minutes ago
      Author here, that&#x27;s a good idea. A straightforward way to exploit an implementation differential like this is if you have a software system that contains two different implementations of IDNA 2003 processing user input. One part of the process processes the domain correctly, the other incorrectly, and in this case you can have one part of a system (such as a policy&#x2F;filter) &quot;see&quot; the data one way and the other part of the system (such as, taking an action as a result of the data) see the data in another way.<p>Server-side Request Forgery (SSRF) is an example of such an exploit targeting a differential in implementations of URL parsers, which is similar to this implementation difference.
      • AgentOrange12346 minutes ago
        &quot;if you have a software system that contains two different implementations of IDNA 2003 processing user input&quot;<p>Is that a real thing though? Is someone doing that?
    • tptacek22 minutes ago
      It creates a parser differential; two different components of the system can treat the same string as different hostnames. Things that have trusted hostnames, or privileged&#x2F;admin hostnames that are screened out, or SSRF filters all depend on accurately comparing presented hostnames.<p>This is pretty situational, though, isn&#x27;t it? You still have to be dealing with IDN names.
    • floxy12 minutes ago
      I suppose I could envision a scenario like: Service A has a &quot;reset your password&quot; option. Someone with a &quot;user@popular-unicode-domain.com&quot; tries to use this option. Normally this fails when mangled-popular-unicode-domain-plus-garbage.com can&#x27;t be found. Enterprising malicious actor registers mangled-popular-unicode-domain-plus-garbage.com, and now gets a hold of user password reset requests.
    • zaphar22 minutes ago
      I&#x27;m too lazy to investigate further but my guess is that if there is a vulnerability here it has something to do with dns name spoofing.
  • tialaramex8 minutes ago
    This idiocy is a big part of why it was so important to get Python people working on TLS implementations to understand that the <i>defined</i> mechanism for SANs (no the &quot;alternative&quot; in Subject Alternative Name doesn&#x27;t mean in the sense of more than one, X.509 is originally for the X.500 system and the Internet repurposed X.509 so these are <i>alternative</i> names from the Internet) says that these are DNS names, they specifically are not to be understood as some sort of human readable text, and thus &quot;decoding&quot; them to Unicode is definitely nonsense even though Python really wanted to do that and I think used to do it or at least proposed to.<p>The rule for how SAN DnsNames match againt like names, from the DNS is very, very simple so that you don&#x27;t screw it up. You handle a single wildcard (ASCII * code 42 matches any single DNS label) and beyond that it&#x27;s literally byte comparison. You don&#x27;t care what these bytes mean, either the bytes are all identical or that&#x27;s not a match and we&#x27;re done.
  • tescreal4 minutes ago
    it would be good to look for &quot;.lower()&quot; squatters if you host on an idn.
  • cat-whisperer20 minutes ago
    the horrors of versioning