Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stored XSS in the markdown preview functionality. Markdown 预览功能中存在存储型 XSS 漏洞 #986

Open
Archeb opened this issue Aug 21, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Archeb
Copy link

Archeb commented Aug 21, 2021

Describe the bug
The markdown preview functionality will cause stored XSS attack, which doesn't require user interaction.
Markdown 预览功能会导致存储型 XSS 攻击,而且不需要用户交互。

To Reproduce

Steps to reproduce the behavior:

  1. Create a new file with ".txt" or ".md" extension. 创建个 .md 或者 .txt 拓展的新文件
  2. Paste the following code.
<img src="x" onerror="alert('xss')">
  1. Share the file and add /text after the URL. 在 URL 后面加上 /text
  2. Send the link to victims. 把链接发送给受害者

Visit https://demo.cloudreve.org/s/YXMmiE/text for example.

Expected behavior
No JavaScript code in markdown preview should be executed. 不执行任何 Markdown 预览中的 JavaScript 代码

Screenshots
image

Desktop (please complete the following information):

  • OS: non-specific
  • Browser: non-specific

Smartphone (please complete the following information):

  • Device: non-specific
@HFO4 HFO4 added the bug Something isn't working label Aug 22, 2021
@HFO4 HFO4 added this to To do in 3.4+ Roadmap via automation Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
3.4+ Roadmap
  
To do
Development

No branches or pull requests

2 participants