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

Stored XSS in HTML message view #1148

Closed
cyberpunkych opened this issue Jul 15, 2022 · 1 comment
Closed

Stored XSS in HTML message view #1148

cyberpunkych opened this issue Jul 15, 2022 · 1 comment

Comments

@cyberpunkych
Copy link

There is Stored Cross-Site Scripting vulnerability in HTML message view. Problem is here:

        @Watch("html")
        async onHtmlChanged(value: string) {
            srcDoc.set(<HTMLIFrameElement>this.$refs.htmlframe, value);
        }

This cause pure html inserting in DOM. PoC message with simple XSS vector:

HELO JakesDominoApp
MAIL FROM: me@127.0.0
DATA
From: me@you.com
To: you@me.com
Subject: A simple test 
Mime-Version: 1.0;
Content-Type: text/html; charset="ISO-8859-1";
Content-Transfer-Encoding: 7bit;

<svg/onload=alert(document.domain)>
.
QUIT

Result:
Screen Shot 2022-07-15 at 20 44 02

This vulnerability could be abused by attackers for lateral movement, phishing against developers and other cases.
For vulnerability fix you need to implement html sanitising before inserting message in pure DOM.

@rnwood
Copy link
Owner

rnwood commented Oct 23, 2022

Resolved in #1201

@rnwood rnwood closed this as completed Oct 23, 2022
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