# CVE-2021-45394: Cross-site Scripting in HTML2PDF

- Severity: High 8.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.63%, higher than 77% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-18T11:15:45.000Z
- Modified: 2026-06-17T04:13:20.027Z
- Also known as: GHSA-6m93-343m-3jrc
- Weaknesses: CWE-79, CWE-502, CWE-918
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- spipu/html2pdf (Packagist): before 5.2.4
- html2pdf_project html2pdf: before 5.2.4

## Every score

- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://www.synacktiv.com/sites/default/files/2022-01/html2pdf_ssrf_deserialization.pdf> (exploit, third-party-advisory, web)
- <https://github.com/spipu/html2pdf> (package, product, third-party-advisory)
- <https://github.com/spipu/html2pdf/blob/master/CHANGELOG.md> (release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-45394> (advisory)
- <https://github.com/spipu/html2pdf/commit/100a4d509abf8550765cf0e0da83e83abb422585> (web)
- <https://github.com/spipu/html2pdf/commit/2e6bab9a2afe9cfd4d3c3038da64d8ad74e41d7f> (web)
- <https://github.com/spipu/html2pdf/releases/tag/v5.2.4> (web)

## Sources

- CVE List: [CVE-2021-45394](https://www.cve.org/CVERecord?id=CVE-2021-45394), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-6m93-343m-3jrc](https://github.com/advisories/GHSA-6m93-343m-3jrc), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-45394](https://nvd.nist.gov/vuln/detail/CVE-2021-45394), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-45394 · Whole record: https://cve.day/CVE-2021-45394.json · Rebuilt by cve.day 2026-11-25T22:58:06.567Z
