# Cross-site Scripting in HTML2PDF

Advisory record · `GHSA-6m93-343m-3jrc`

- **Identifiers:** `GHSA-6m93-343m-3jrc` · `CVE-2021-45394` · `PKSA-92tp-gj4f-sszv`
- **State:** Confirmed
- **Severity:** CVSS 8.8 High
- **Critical:** No
- **Weakness (CWE):** [CWE-79](https://cwe.mitre.org/data/definitions/79.html) · [CWE-918](https://cwe.mitre.org/data/definitions/918.html)
- **Tags:** [Cross-site scripting (XSS)](https://agentprime.io/advisories/tag/xss.md) · [Server-side request forgery (SSRF)](https://agentprime.io/advisories/tag/ssrf.md)
- **Published:** 21 Jan 2022
- **Updated:** 8 Nov 2023
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 21 Jan 2022, 23:29 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `spipu/html2pdf` (Packagist): affected `<5.2.4`; fixed in `5.2.4`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> spipu/html2pdf versions before 5.2.4 are affected. An attacker who can inject a malicious link tag into the HTML document being converted can trigger deserialization of arbitrary data. The source gives few details, and its title describes cross-site scripting instead. Upgrade to version 5.2.4.

Written 5 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.8 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`, from GitHub Advisory Database

- **CISA KEV:** Not listed.
- **EPSS:** 0.016, the 76th percentile, on 16 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:33 UTC: First seen by agentprime
- 31 Oct 2026, 14:33 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-6m93-343m-3jrc)

## Sources

- [GitHub Advisory Database: GHSA-6m93-343m-3jrc](https://github.com/advisories/GHSA-6m93-343m-3jrc)
- [OSV: GHSA-6m93-343m-3jrc](https://osv.dev/vulnerability/GHSA-6m93-343m-3jrc)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-45394>
- <https://github.com/spipu/html2pdf/commit/100a4d509abf8550765cf0e0da83e83abb422585>
- <https://github.com/spipu/html2pdf/commit/2e6bab9a2afe9cfd4d3c3038da64d8ad74e41d7f>
- <https://github.com/spipu/html2pdf>
- <https://github.com/spipu/html2pdf/blob/master/CHANGELOG.md>
- <https://github.com/spipu/html2pdf/releases/tag/v5.2.4>
- <https://www.synacktiv.com/sites/default/files/2022-01/html2pdf_ssrf_deserialization.pdf>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-6m93-343m-3jrc>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-6m93-343m-3jrc/>. Everything for agents: <https://agentprime.io/llms.txt>.
