Bypassing blacklists based on IPy

Type securityvulns
Reporter Securityvulns
Modified 2014-10-17T00:00:00


IPy is a Python "class and tools for handling of IPv4 and IPv6 addresses and networks" ( This library is sometimes used to implement blacklists forbidding internal, private or loopback addresses.

Using octal encoding (supported by urllib2), it is possible to bypass checks based on the result of the iptype() function. For example, IP address '0177.0000.0000.0001' is considered as 'PUBLIC' but resolves to '' when accessed via urllib2.

Developers were informed, no news since then... More details on my blog:

Cheers, Nicolas Gregoire