Closed orb77 closed 1 year ago
Hi, Sorry for the delay in response.
The editor itself neither allows pasting javascript directly to be executed nor sanitizes the input, it is the responsibility of the developer to sanitize the input before providing it to the editor.
Or Maybe you could write a pluing to sanitize html before the editor renders it. I am sure that there should be a prosemirror handle to preprocess html before inseted.
Let me know if you have more questions.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.
What happened?
If you provide the editor with
img
and the tag containsonerror
attribute it executes JavaScript when thesrc
attribute is invalid. Sampleimg
input:<img src="notfound" onerror="alert('Vulnerable!')" />
Version
15.3.0
Angular Version
15.1.0
What browsers are you seeing the problem on?
Chrome
Link to reproduce
stackblitz
Relevant log output
No response
Willing to submit a PR?
None