Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
FS#46259 - JSONP vulnerabilities in the rpc.php script
Attached to Project:
AUR web interface
Opened by felix (fstirlitz) - Friday, 11 September 2015, 14:31 GMT
Last edited by Lukas Fleischer (lfleischer) - Saturday, 03 October 2015, 07:59 GMT
Opened by felix (fstirlitz) - Friday, 11 September 2015, 14:31 GMT
Last edited by Lukas Fleischer (lfleischer) - Saturday, 03 October 2015, 07:59 GMT
|
DetailsThe JSON endpoint at /rpc.php allows arbitrary strings to be used as the JSONP callback name. This could be exploited by an XSS attack (executing arbitrary JavaScript on behalf of aur.archlinux.org), or by a content-sniffing attack like <https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/>.
|
This task depends upon
Closed by Lukas Fleischer (lfleischer)
Saturday, 03 October 2015, 07:59 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 4.1.0.
Saturday, 03 October 2015, 07:59 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 4.1.0.
1. Remove that feature altogether.
2. Restrict the callback name to a certain character set and a certain sensible length. Also add the "/**/" workaround described in the article.
eg: https://aur.archlinux.org/rpc.php?type=search&arg=foobar&callback=foo_bar gives the error as
{"version":1,"type":"error","resultcount":0,"results":"Invalid callback name."}
May be, adding underscore to the regex pattern in,
file /lib/aurjson.class.php, line no 122, will fix this