This repository documents the vulnerability details and exploit for Redactror JS 4 and prior versions.
- CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- CVSS: 6.1 (MEDIUM)
This Proof of Concept (POC) demonstrates the exploitation of an XSS vulnerability discovered by me recently in the Redactror JS WYSIWYG editor, which affects all versions of Redactor JS 4 and its prior versions. The library fails to sanitize various tags, attributes and event handlers, which allows JavaScript execution within the editor.
- Redactor JS (version <= 4.*.*): https://imperavi.com/redactor/examples/initialization/base-example/
This vulnerability can be tested using the latest version of Redactor JS 4 instance present here.
To test this vulnerability using Redactor JS 3 instead, navigate here.
-
Switch to Source/HTML mode and insert payloads:
-
Switch to WYSIWYG Mode:
-
Click on the "HTML" icon again to switch back to the WYSIWYG mode.
-
Observe the
<iframe>
tag payload getting triggered automatically. -
Observe the custom
<var>
tag payload getting triggered after hovering the mouse over theXSS
text. -
Observe the
<img>
tag payload getting triggered after clicking on the broken image icon.
-