CVE Explorer
CVE-2026-22787
html2pdf.js converts any webpage or element into a printable PDF entirely client-side. Prior to 0.14.0, html2pdf.js contains a cross-site scripting (XSS) vulnerability when given a text source rather than an element. This text is not sufficiently sanitized before being attached to the DOM, allowing malicious scripts to be run on the client browser and risking the confidentiality, integrity, and availability of the page's data. This vulnerability has been fixed in html2pdf.js@0.14.0.
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"html2pdf.js","vendor":"eKoopmans","versions":[{"status":"affected","version":"< 0.14.0"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":8.7,"baseSeverity":"HIGH","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"PASSIVE","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
1 source assertion{"cweId":"CWE-79","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/problemTypes/0/descriptions/0
Source references
6 source assertions{"url":"https://aydinnyunus.github.io/2026/01/17/cve-2026-22787-html2pdf-xss-vulnerability/"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/adp/1/references/0
{"name":"https://github.com/eKoopmans/html2pdf.js/commit/988826e336035b39a8608182d7b73c0e3cd78c7b","tags":["x_refsource_MISC"],"url":"https://github.com/eKoopmans/html2pdf.js/commit/988826e336035b39a8608182d7b73c0e3cd78c7b"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/references/3
{"name":"https://github.com/eKoopmans/html2pdf.js/issues/865","tags":["x_refsource_MISC"],"url":"https://github.com/eKoopmans/html2pdf.js/issues/865"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/references/1
{"name":"https://github.com/eKoopmans/html2pdf.js/pull/877","tags":["x_refsource_MISC"],"url":"https://github.com/eKoopmans/html2pdf.js/pull/877"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/references/2
{"name":"https://github.com/eKoopmans/html2pdf.js/releases/tag/v0.14.0","tags":["x_refsource_MISC"],"url":"https://github.com/eKoopmans/html2pdf.js/releases/tag/v0.14.0"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/references/4
{"name":"https://github.com/eKoopmans/html2pdf.js/security/advisories/GHSA-w8x4-x68c-m6fc","tags":["x_refsource_CONFIRM"],"url":"https://github.com/eKoopmans/html2pdf.js/security/advisories/GHSA-w8x4-x68c-m6fc"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:6db26aa36b86401702fff13724adab55432b7edac87349eabf89246d1f72025a · sha256:76c3cc9d516e8161… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.