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

[Bug] Pasted blocks are not sanitized, It may occurs XSS attack! #1396

Closed
hata6502 opened this issue Oct 24, 2020 · 3 comments
Closed

[Bug] Pasted blocks are not sanitized, It may occurs XSS attack! #1396

hata6502 opened this issue Oct 24, 2020 · 3 comments

Comments

@hata6502
Copy link
Contributor

Describe a bug.
Pasted blocks are not sanitized, It may occurs XSS attack!

Steps to reproduce:

  1. Copy blocks includes <b onclick="alert('XSS test')">Click me!</b>
  2. Paste blocks.
  3. Click it.

Please see the following GIF animation.

Expected behavior:
Pasted blocks should be sanitized.

Screenshots:
ezgif com-gif-maker (7)

Editor.js version: v2.19.0

@hata6502 hata6502 added the bug label Oct 24, 2020
@gurshafriri
Copy link

👋 @gohabereg @neSpecc did you have a chance to follow up on this issue?
We (at snyk) would like to add it to our vulnerability db if it is valid.

@neSpecc
Copy link
Member

neSpecc commented Nov 20, 2020

Actually, it will be sanitised on saving, so this is not a real vulnerability. But we will think about it.

@hata6502
Copy link
Contributor Author

@neSpecc Thank you! I'll fix it and send PR.

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

No branches or pull requests

3 participants