Closed K0RSHAK closed 2 months ago
ipfs.io
and dweb.link
, fill issue in https://github.com/ipshipyard/waterworks-community/issuesContent-Type
based on that. If you find a bug in Kubo or Rainbow, you can fill issue in upstream library https://github.com/gabriel-vasile/mimetype@K0RSHAK i'm closing this, hopefully the above will point you in the right place to discuss further. in the future or if you still want to report a security issue, please follow https://github.com/ipfs/community/blob/master/SECURITY.md with responsible disclosure sensibility (not posting on public forums).
Description
During testing [REDACTED] dApp that uses IPFS for storing NFT files it was possible to upload an SVG file with JavaScript inside and perform the XSS attack. Moreover I was able to rewrite uploaded file with the HTML file, including JavaScript code inside.
CVSS: 4.6 Medium AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N Env: Ghostnet
Impact
Uploading and hosting an SVG file containing malicious code could lead to various attacks, including:
Evidence
Link to check the PoC: https://ipfs.io/ipfs/QmVFs5oNkZVe4EaXkCL8xZn29ziicYnu9KbNdojT8RU59W Payload: SVG+XML
HTML
Suggestions
onclick
,onload
etc. and tags such as<img/>
or<script>
script-src 'none'
to prevent malicious script execution