Bug 19114

Summary: Stored XSS in parcels.pl
Product: Koha Reporter: Amit Gupta <amitddng135>
Component: Architecture, internals, and plumbingAssignee: Amit Gupta <amitddng135>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: amit.gupta, amitddng135, chris, fridolin.somers, jonathan.druart, katrin.fischer, m.de.rooy, mtj, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 14568    
Attachments: Bug 19114 - Stored XSS in parcels.pl
[SIGNED OFF] Bug 19114 - Stored XSS in parcels.pl
Bug 19114 - Stored XSS in parcels.pl

Description Amit Gupta 2017-08-15 15:27:31 UTC
Affected URL:
/cgi-bin/koha/acqui/parcel.pl?invoiceid=[invoiceid]
/cgi-bin/koha/acqui/parcels.pl?booksellerid=[booksellerid]
/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=[ordernumber]&invoiceid=[invoiceid]
Comment 1 Amit Gupta 2017-08-15 15:34:08 UTC
Created attachment 66021 [details] [review]
Bug 19114 - Stored XSS in parcels.pl

Test
1. Hit the page /cgi-bin/koha/acqui/parcels.pl?booksellerid=xx
   xx is booksellerid
2. Add a text in the field Vendor invoice that contains java script
3. Save the page.
4. Notice js is execute
5. Apply patch and reload the js is escaped

Fixed XSS for parcels.pl/parcel.pl/orderreceive.pl
Comment 2 Katrin Fischer 2017-08-16 08:44:47 UTC
Fixed pages are ok with the patch, I found some more instances in the invoices, will check if other bugs exist for that.
Comment 3 Katrin Fischer 2017-08-16 08:46:12 UTC
Created attachment 66047 [details] [review]
[SIGNED OFF] Bug 19114 - Stored XSS in parcels.pl

Test
1. Hit the page /cgi-bin/koha/acqui/parcels.pl?booksellerid=xx
   xx is booksellerid
2. Add a text in the field Vendor invoice that contains java script
3. Save the page.
4. Notice js is execute
5. Apply patch and reload the js is escaped

Fixed XSS for parcels.pl/parcel.pl/orderreceive.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Marcel de Rooy 2017-08-16 11:31:56 UTC
Created attachment 66066 [details] [review]
Bug 19114 - Stored XSS in parcels.pl

Test
1. Hit the page /cgi-bin/koha/acqui/parcels.pl?booksellerid=xx
   xx is booksellerid
2. Add a text in the field Vendor invoice that contains java script
3. Save the page.
4. Notice js is execute
5. Apply patch and reload the js is escaped

Fixed XSS for parcels.pl/parcel.pl/orderreceive.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Jonathan Druart 2017-08-29 15:07:50 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Fridolin SOMERS 2017-09-05 10:35:47 UTC
Pushed to 17.05.x, is in 17.05.03
Comment 7 Katrin Fischer 2017-09-07 06:13:28 UTC
This patch has been pushed to 16.11.x and is in 16.11.11.
Comment 8 Mason James 2017-09-20 02:41:32 UTC
Pushed to 16.05.x, for 16.05.16 release - thanks Amit :0)