CVE-2024-1647 pyhtml2pdf 0.0.6 - Local File Read via Server Side XSS
An attacker can read arbitrary local files by injecting malicious HTML into the pyhtml2pdf library due to lack of input validation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-1647?
CVE-2024-1647 is a high-severity cross-site scripting vulnerability in pyhtml2pdf, published on 19 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2024-1647?
3 open source packages ship an affected version, including pyhtml2pdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pyhtml2pdf PyPI | All versions to 0.0.6 | None |
pyhtml2pdf PyPI | All versions to 0.0.6 | None |
pyhtml2pdf PyPI | All versions to 0.0.6 | None |
Products include Kumaf Pyhtml2pdf.
How do I fix CVE-2024-1647?
No fix has been published for CVE-2024-1647 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-1647 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1647 exists.
Sources
Also known as GHSA-p3rv-qj56-2fqx, PYSEC-2024-301.