Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wiki entry for scanning files against XSS #753

Open
jankapunkt opened this issue Jun 26, 2020 · 3 comments
Open

Wiki entry for scanning files against XSS #753

jankapunkt opened this issue Jun 26, 2020 · 3 comments

Comments

@jankapunkt
Copy link
Collaborator

jankapunkt commented Jun 26, 2020

Documentation is missing something or incorrect (have typos, etc.):

  • Give an expressive description what you have changed/added and why

The wiki contains already some information on how to scan uploaded files for mime-types. However I think beginners are not aware of potential XSS vulnerabilities through JS code hidden uploaded files.

I would like to discuss first opinions on this topic and what should be included/excluded from a potential wiki entry.

To given an example:

You can easily add <script>;alert()</script> to any SVG file and upload it to the server. Even if the front-end code successfully stips / ignores the script tag, it would still be executed when viewing the file standalone in a new window.

Therefore the svg file needs to be checked server-side for any script tag and an error needs to be thrown.

@dr-dimitru
Copy link
Member

@jankapunkt I believe it's beyond this particular library. As this is part of devops/opsec measurements for any and every file upload out there. Every developer on any language, platform, server, and stack has to implement security measurements.

What we can do for beginners:

  1. Pick list of recommended literature, articles, etc.
  2. Highlight best practices and must-have in our WIki;

Let me know wdyt

@harryadel
Copy link
Contributor

Thanks for highlighting this @jankapunkt I also thought of it and what the best practices are.
What about these links for literature? @dr-dimitru

@jankapunkt
Copy link
Collaborator Author

Hey @harryadel I would definitely cite these sources when creating a wiki entry. I will create a new entry when there is time the next week.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants