mistune にパストラバーサルとXSSの脆弱性、任意ファイルを読まれるおそれ
Summary
mistune の 3.3.0 より前の版では、Include ディレクティブで「../」を含むパスを指定することで、攻撃者が任意のファイルを読み取れるおそれがあります。エラーメッセージや取り込まれたファイルの内容を通じてHTMLを挿入され、escape=True を設定していてもクロスサイトスクリプティングが成立する場合があります。3.3.0 以降の版に更新してください。
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
mistune の 3.3.0 より前の版では、Include ディレクティブで「../」を含むパスを指定することで、攻撃者が任意のファイルを読み取れるおそれがあります。エラーメッセージや取り込まれたファイルの内容を通じてHTMLを挿入され、escape=True を設定していてもクロスサイトスクリプティングが成立する場合があります。3.3.0 以降の版に更新してください。
Affected packages
| Ecosystem | Package | Affected | Fixed |
|---|---|---|---|
| lepture | mistune |
< 3.3.0 |
3.3.0 |
Original description The description as published by the source.
Mistune before 3.3.0 contains a path traversal vulnerability in the Include directive that allows attackers to read arbitrary files by supplying ../ sequences in include paths. Attackers can also inject HTML through unescaped error messages and included file contents to perform cross-site scripting even when escape=True is set.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- web github.com
- web vulncheck.com
- web nvd.nist.gov
- web github.com