Skip to content
XSS Disclosed report Beginner

Reflected XSS - in Email Input

The email input field on the user profile page did not sanitise or encode special characters, allowing a reflected cross-site scripting attack. An attacker could inject a script that executes in the victim's browser when the profile is saved.

ahmd_halabi Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 2.0 years
  • Disclosed after 2.1 years

Target Url https://█████

Summary: Hello, I found a reflected xss injection in the email input when updating user profile. Seems Email input is not sanitized and the special characters are not encoded.

xss payload used "><img src=x onerror=alert(1);>

Step-by-step Reproduction Instructions

  1. Navigate to the target url https://███/█████/ and login.
  2. Then go to My Profile.
  3. Set any password. In Email input, add the payload next to the email.

Example [email protected]"><img src=x onerror=alert(1);> Then click save.

See this POST Request

POST /██████/edit_profile/ HTTP/1.1
Host: ████████

REQUEST HEADER HERE

-----------------------------191691572411478
Content-Disposition: form-data; name="action"

save_info
-----------------------------191691572411478
Content-Disposition: form-data; name="password[original]"

NEWPASSWORD
-----------------------------191691572411478
Content-Disposition: form-data; name="password[confirmed]"

NEWPASSWORD
-----------------------------191691572411478
Content-Disposition: form-data; name="email[original]"

███████"><img src=x onerror=alert(1);>
-----------------------------191691572411478--

And an Alert will pop up ;) █████████

Suggested Mitigation/Remediation Actions

Sanitize input fields or encode/escape special characters to avoid xss.

Impact

An attacker can execute malicious javascript codes on the target application.

Hope this is not duplicate :|

The original report as published on HackerOne, by ahmd_halabi. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Root cause

Likely the application failed to sanitise or encode user-supplied input in the email field before reflecting it back in the response.

Impact

An attacker could execute malicious JavaScript code on the target application.

What the attacker needed

A user account

The fix

Input fields should be sanitised or special characters should be encoded/escaped to prevent XSS.

How it was found

  1. Navigate to the target URL and log in.
  2. Go to the My Profile page.
  3. Set a password and add the payload next to the email address in the Email input.
  4. Click save.
  5. Observe the alert pop up.

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 you type something into a website, the site should treat it as text, not as code. Here, the email field was displayed back to the user without cleaning it, so an attacker could put a small script in the email field. That script then runs in the browser of anyone who views the page, which is called cross-site scripting (XSS).

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by ahmd_halabi

View all

12 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.