PacketFence - BTS - PacketFence
View Issue Details
0001362PacketFencesecuritypublic2012-01-10 13:472012-02-28 14:31
obilodeau 
obilodeau 
highmajoralways
closedfixed 
 
3.2.03.2.0 
bc47f31583011d5bfc6612a1766ac2bb474a9718
0001362: Reflected XSS in printer.php's img_src, font_size and $_SERVER[REQUEST_URI]
Exploit PoC img_src:
https://packetfence:1443/printer.php?img_src=%27%3E%3Cscript%3Ealert%28%22Your%20admin%20cookies:%20%22%2bdocument.cookie%29;%3C/script%3E [^]

Exploit PoC font_size:
For the exploit to work, you'll have to get the user to load a valid Web Admin page with a table of data beforehand. It's required to see the font-size tags.
https://packetfence:1443/printer.php?current_top=node&current_sub=view&font_size=%27%3E%3Cscript%3Ealert%28%22Your%20admin%20cookies:%20%22%2bdocument.cookie%29;%3C/script%3E [^]

img_src:
After looking around, I didn't find a user passing img_src in the GET so the 'feature' will be removed entirely.

font_size: will be sanitized
No tags attached.
patch security-fix-1362-xss-in-printer.php.patch (4,275) 2012-01-10 15:03
https://www.packetfence.org/bugs/file_download.php?file_id=126&type=bug
Issue History
2012-01-10 13:47obilodeauNew Issue
2012-01-10 13:47obilodeauStatusnew => assigned
2012-01-10 13:47obilodeauAssigned To => obilodeau
2012-01-10 14:09obilodeauSummaryReflected XSS in printer.php's img_src => Reflected XSS in printer.php's img_src and font_size
2012-01-10 14:09obilodeauDescription Updated
2012-01-10 14:41obilodeauNote Added: 0002527
2012-01-10 14:41obilodeauSummaryReflected XSS in printer.php's img_src and font_size => Reflected XSS in printer.php's img_src, font_size and $_SERVER[REQUEST_URI]
2012-01-10 14:41obilodeauDescription Updated
2012-01-10 15:03obilodeauFile Added: security-fix-1362-xss-in-printer.php.patch
2012-01-10 15:03obilodeauNote Added: 0002528
2012-01-10 15:49obilodeaumtn revision => bc47f31583011d5bfc6612a1766ac2bb474a9718
2012-01-10 15:49obilodeauNote Added: 0002529
2012-01-10 15:49obilodeauStatusassigned => resolved
2012-01-10 15:49obilodeauFixed in Version => trunk
2012-01-10 15:49obilodeauResolutionopen => fixed
2012-02-22 14:39obilodeauNote Added: 0002576
2012-02-22 14:39obilodeauView Statusprivate => public
2012-02-28 14:22obilodeauTarget Version+1 => 3.2.0
2012-02-28 14:22obilodeauFixed in Versiontrunk => 3.2.0
2012-02-28 14:31obilodeauNote Added: 0002587
2012-02-28 14:31obilodeauStatusresolved => closed

Notes
(0002527)
obilodeau   
2012-01-10 14:41   
Another one in $_SERVER[REQUEST_URI]. Need an old browser as current FF and Chrome didn't work, I needed a proxy to escape the URL encoding done by the browsers.
(0002528)
obilodeau   
2012-01-10 15:03   
attached patch
(0002529)
obilodeau   
2012-01-10 15:49   
fixed in trunk
(0002576)
obilodeau   
2012-02-22 14:39   
bug report now public
(0002587)
obilodeau   
2012-02-28 14:31   
Fixed in recently released 3.2.0.