[issue32993] urllib and webbrowser.open() can open w/ file: protocol

2018-03-10 Thread yao zhihua
yao zhihua added the comment: Here about webbrowser vulnerability. https://bugs.python.org/issue32367 You could execute command with file protocols in python 2.7.10. poc : import webbrowser, os filename = "/bin/ls" webbrowser.open(os.path.realpath(filename)) If python has

[issue32993] urllib and webbrowser.open() can open w/ file: protocol

2018-03-10 Thread yao zhihua
yao zhihua added the comment: Borrow what others have said from Issue11662. The Python urllib and urllib2 modules are typically used to fetch web pages but by default also contains handlers for ftp:// and file:// URL schemes. Now unfortunately it appears that it is

[issue32993] issue11662 Incomplete fix

2018-03-04 Thread yao zhihua
yao zhihua added the comment: I tried again, webbrowser module can only open file:///etc/passwd. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32993] issue11662 Incomplete fix

2018-03-04 Thread yao zhihua
yao zhihua added the comment: I also found a function without filtering file protocol. poc: import webbrowser webbrowser.open('file:///etc/passwd') -- ___ Python tracker <https://bugs.python.o

[issue32993] issue11662 Incomplete fix

2018-03-04 Thread yao zhihua
Change by yao zhihua : -- title: issue30657 Incomplete fix -> issue11662 Incomplete fix ___ Python tracker <https://bugs.python.org/issue32993> ___ ___ Python-

[issue32993] issue30657 Incomplete fix

2018-03-04 Thread yao zhihua
yao zhihua added the comment: Okay my falut.I made the wrong issue.The issue is issue11662.Urlopen function can use the file protocol, when an attacker input file:///etc/passwd, it can leak the contents of the passwd file. -- ___ Python tracker

[issue32993] issue30657 Incomplete fix

2018-03-04 Thread yao zhihua
New submission from yao zhihua : Due to the incomplete fix for CVE-2011-1521, urllib and urllib2 exist for this vulnerability and I tested on the version of Python 3.4.8 (default, Mar 4 2018, 20:37:04).I am sorry that I do not know how to fix it. -- components: Library (Lib) files