CVE-2021-45394 Cross-site Scripting in HTML2PDF
Attackers can execute arbitrary code by injecting malicious link tags into HTML documents processed by the HTML2PDF library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-45394?
CVE-2021-45394 is a high-severity unsafe deserialization vulnerability in n/a, published on 18 Jan 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
An issue was discovered in Spipu HTML2PDF before 5.2.4. Attackers can trigger deserialization of arbitrary data via the injection of a malicious <link> tag in the converted HTML document.
Which versions are affected by CVE-2021-45394?
2 open source packages ship an affected version, including spipu/html2pdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
spipu/html2pdf Packagist | All versions | 5.2.4 |
spipu/html2pdf Packagist | All versions | 5.2.4 |
Products include Html2pdf Project Html2pdf.
How do I fix CVE-2021-45394?
Upgrade spipu/html2pdf to 5.2.4 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2021-45394 being exploited?
There is no known exploitation of CVE-2021-45394 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-6m93-343m-3jrc.