Skip to content
XSS Write-up Beginner

My first bug | Html injection|

The target's website displayed user-supplied email content as raw HTML when creating a support ticket, allowing an attacker to inject HTML elements. An attacker could create a fake login form (phishing page) on the site, potentially stealing credentials.

pandeyrishu621 Follow

Published on medium.com

HTML injection is a type of attack where malicious HTML code is inserted into a website.

Pandeyrishu, 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 HTML-encode user-supplied email content before rendering it in the ticket view.

Impact

An attacker could inject HTML to create a phishing page on the website, which could lead to loss of reputation and data theft.

What the attacker needed

Ability to send email to target; victim visits the ticket page

The fix

The application should HTML-encode user-submitted data so it is treated as plain text rather than HTML code.

How it was found

  1. Send an email with HTML content to the target's complaint address.
  2. The target creates a ticket from the email that is shown on the website.
  3. View the ticket on the website and observe that the HTML payload is triggered.

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 a website shows text that a user sent, it should treat it as plain text, not as code. Here, the site put the email content directly into the page as HTML, so an attacker could add their own HTML, like a fake login form, to trick visitors.

What is XSS?

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

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.