Skip to content

Conversation

@Teloshav
Copy link

@Teloshav Teloshav commented May 7, 2023

Q A
Bug fix? yes
New feature? no
Breaking changes? no
Deprecations? no
New tests added? not needed
Fixed tickets Fixes #3618
License MIT

Description

In ticket #3618 there was a DOM-based XSS which allowed "arbitrary JavaScript code to run in the context of MarkText main window." (quoted from @chromium1337, the author of ticket #3618), I also updated caniuse-lite while getting the build to work, not exactly sure what that does; but there you go! 😁

Edit: Seems like my fix won't allow for link pasting now that I've just tried it. I'll have to see what is happening with that.

@Teloshav
Copy link
Author

Edit: Seems like my fix won't allow for link pasting now that I've just tried it. I'll have to see what is happening with that.

} else {
const span = document.createElement('span')
span.innerHTML = text
span.innerHTML = sanitize(title, PREVIEW_DOMPURIFY_CONFIG, true)
Copy link

@Limatucano Limatucano Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question: shouldn't the text where the title is? for example sanitize(text, PREVIEW_DOMPURIFY_CONFIG, true)?

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.

Security Issue: DOM-Based XSS leading to RCE

2 participants