niklasvh / html2canvas

Screenshots with JavaScript
https://html2canvas.hertzen.com/
MIT License
30.48k stars 4.8k forks source link

Cross Site Scripting vulnerability was founded on SAST report generated by Fortify #3115

Open nestorbfgo opened 1 year ago

nestorbfgo commented 1 year ago

Please make sure you are testing with the latest release of html2canvas. Old versions are not supported and issues reported for them will be closed.

Please follow the general troubleshooting steps first:

Bug reports:

Hi, Recently my team and I ran SAST report and we found that html2canvas has a Cross Site Scripting vulnerability on \html2canvas\html2canvas\dist\html2canvas.js , line 5698, Share with you next code

CacheStorage.setContext = function (window) { CacheStorage._link = window.document.createElement('a'); CacheStorage._origin = CacheStorage.getOrigin(window.location.href); }; My question here is, is it a real vulnerability ? why yes or not? and How we can fixed. By the way I founded something related on this old PR but there is tracking about it https://github.com/niklasvh/html2canvas/pull/2711

Specifications: