Bug 19114 - Stored XSS in parcels.pl
Summary: Stored XSS in parcels.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Amit Gupta
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 14568
  Show dependency treegraph
 
Reported: 2017-08-15 15:27 UTC by Amit Gupta
Modified: 2019-10-14 19:56 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19114 - Stored XSS in parcels.pl (4.54 KB, patch)
2017-08-15 15:34 UTC, Amit Gupta
Details | Diff | Splinter Review
[SIGNED OFF] Bug 19114 - Stored XSS in parcels.pl (4.63 KB, patch)
2017-08-16 08:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19114 - Stored XSS in parcels.pl (4.71 KB, patch)
2017-08-16 11:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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)