Skip to content
Info disclosure Write-up Intermediate

That’s how I turned a simple parameter into full email content injection in a trusted password…

The password reset email's language parameter was reflected unsanitised into the reset link, allowing an attacker to inject newlines and arbitrary text. An attacker could send fully controlled content, including a phishing link, to any victim's email address through an official government email channel.

ahmedaamerr1 Follow

Published on medium.com

بِسْ� ِ اللَّـهِ الرَّحْ� َٰنِ الرَّحِي� ِ، وَالصَّلَاةُ وَالسَّلَا� ُ عَلَىٰ الْ� َبْعُوثِ رَحْ� َةً لِلْعَالَ� ِينَ ﷺ

mickoz, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up 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 the 'lang' parameter before inserting it into the password reset email body, allowing newline injection.

Impact

An attacker could send fully controlled content, including phishing links, to any victim's email address through an official government email channel, without verification.

What the attacker needed

Victim's email address; ability to send password reset request

How it was found

  1. Send a 'Forgot Password' request and intercept it.
  2. Add 'XX' to the 'lang' parameter and observe it reflected in the reset link.
  3. Insert a newline character (\n) in the 'lang' parameter to break the link structure.
  4. Craft a payload with a newline and a fake important message containing an attacker link.
  5. Send the request and observe the fully controlled content in the email.

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 write-up has not been written yet. The Original tab links to the source.

When you request a password reset, the website sends you an email with a special link. The website was putting part of your request (the language setting) directly into that email without cleaning it. By adding special newline characters, an attacker could make the email contain extra lines, like a fake link to a phishing site, and the email would look like it came from the real organisation.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.