DOM Based XSS in mycrypto.com
The 'connected successfully' message on mycrypto.com was inserted into the page without sanitisation, allowing an attacker to inject arbitrary HTML via the URL fragment. The reporter could not execute JavaScript because an AngularJS sanitiser stripped malicious href attributes, but HTML injection still enabled phishing, content spoofing, and clickjacking.
- Triaged in 43 hours
- Fixed in 3 days
- Disclosed after 7 days
##Description & PoC The "connected successfully" message is printed out without any output sanitation:

This is how it's being printed(this code snippet is taken from mycrypto-master.js, line 4072):

An attacker can simply put his payload at the link and it'll be embedded within the page output:
https://mycrypto.com/#send-transaction<div/class="header__wrap"><a/href=javascript:alert(0)><h1>pwn3d</h1></a><img/src=//unskid.me/dist/jesus.gif></div>

##Notes As you can see, I couldn't get any javascript running, that's because the application has an AngularJS XSS protection that goes through ALL the href\src\similiar attributes in the DOM and checks if it has a malicious content/XSS attempts with a tough regex(based on a whitelist). Couldn't bypass that. Some screenshots of the "angular-XSS-blocker" from the chrome debugger :


Once it's triggered and see a malicious attempt(isImg==false), the malicious <a> tag:
<a href="javascript:alert(0)">click here</a>
turns into:
<a>click here</a>
Impact
Although i did not get running javascript i still think that it's worth reporting because, well, still..anyone can inject other HTML code in that part of the application and it should be encoded. It can lead to other things like phishing/content spoofing/clickjacking.
The hacker selected the Cross-site Scripting (XSS) - DOM weakness. This vulnerability type requires contextual information from the hacker. They provided the following answers:
URL https://mycrypto.com/#here
Verified Yes
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
Although JavaScript execution was blocked by the AngularJS sanitiser, an attacker could still inject HTML to conduct phishing, content spoofing, or clickjacking.
What the attacker needed
Victim clicks a crafted link
The fix
The application should encode or sanitise the URL fragment before inserting it into the DOM.
How it was found
- Craft a URL with a payload in the fragment after #send-transaction.
- Open the crafted URL in a browser.
- Observe the injected HTML rendered in the page, with the AngularJS sanitiser removing the javascript: href.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a website takes part of the address you type (the bit after the #) and puts it directly into the page without cleaning it, an attacker can add their own HTML. Here the site did clean dangerous links, so script did not run, but the attacker could still add fake content to trick users.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.