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

Plugin vulnerable to XSS Vulnerability #117

Open
emckerrow1 opened this issue Apr 11, 2024 · 2 comments
Open

Plugin vulnerable to XSS Vulnerability #117

emckerrow1 opened this issue Apr 11, 2024 · 2 comments

Comments

@emckerrow1
Copy link

Describe the problem

When adding a payload to the edit HTML code editor after clicking the 'Show HTML code' button; the payload will execute (see screenshot).

image

What did you expect?

Validation to be applied that allows only expected tags and attributes.

What version and browser are you using?

Version: v1.1.0
Browser and version: Brave 1.64.116 Chromium: 123.0.6312.105 (Official Build) (64-bit)

Reproducible test case

  • Create environment with default settings (tested on a textarea field)
  • Click 'Show HTML code' button
  • Append payload to text editor. Payload example: <script>console.log(document.cookie)</script>
@webfashionist
Copy link
Owner

Hi @emckerrow1

Thank you for your notice.
However, I do see a problem in cases where a script tag should be added to include widgets or other embeds.

Simply disallowing the script tag does not seem to be the solution.

Do you have a specific fix in mind?

@emckerrow1
Copy link
Author

Hi @webfashionist

Apologies, I have not had a chance to look for a more specific fix, directly for the plugin.

The best solution is to use sanitization, where appropriate. However, if this is not possible, it is worth documenting this issue, ensuring the developer using the plugin, mitigates any potential malicious payloads and tailors script execution for their needs. I suggest they use a library like DOMPurify for user input sanitization and apply a CSP (Content Security Policy).

Sorry I cannot be more helpful at this time. I will let you know if I come up with an exact solution.

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

No branches or pull requests

2 participants