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

fix(designer-ui): Prevent certain malicious HTML from executing in raw HTML editor #4554

Closed
wants to merge 1 commit into from

Conversation

ek68794998
Copy link
Contributor

@ek68794998 ek68794998 commented Apr 5, 2024

Note: I have tests for this, but they will be added in a follow-up PR once this fix rolls out.

[Targeting 2.X and 3.X versions as needed. Main PR is #4553.]

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix [security]

  • What is the current behavior? (You can also link to an open issue here)

Certain maliciously crafted payloads, if provided into the raw HTML editor, may permit XSS attacks. Please ping me directly if there are questions about specifics.

  • What is the new behavior (if this is a feature change)?

Use of DOMParser instead of document.createElement prevents malicious HTML from being executed.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No

  • Please Include Screenshots or Videos of the intended change:

Not included as this is a security fix.

@ek68794998
Copy link
Contributor Author

Closing as we'll be taking a slightly different fix for 3.X versions.

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

Successfully merging this pull request may close these issues.

2 participants