Skip to content
XSS Write-up Beginner

*Text Based Injection- Content Spoofing*

The application reflected user-supplied text from a URL parameter into its error page, allowing an attacker to display arbitrary messages under the trusted domain. An attacker could craft a link that shows false information, such as a fake security notice or a recommendation to visit a competitor site, to deceive users.

Aswin K V Follow

Published on infosecwriteups.com

Content spoofing, also referred to as content injection, “arbitrary text injection” or virtual defacement, is an attack targeting a user made possible by an injection vulnerability in a web application. When an application does not properly handle user-supplied data, an attacker can supply content to a web…

Aswin K V, on infosecwriteups.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 reflected user-controlled input from the URL directly into the error page without validation or encoding.

Impact

This attack is typically used as, or in conjunction with, social engineering because the attack is exploiting a code-based vulnerability and a user’s trust.

What the attacker needed

Victim clicks a crafted link

The fix

The application should validate and restrict parameter values on the server side, reject requests with unexpected content, avoid constructing messages from URL data, and use predefined messages or custom error pages.

How it was found

  1. Identify a web application that reflects URL parameters in its error page.
  2. Find a vulnerable parameter or path segment that is reflected.
  3. Craft a malicious link by modifying the valid request to include attacker-controlled text.
  4. Send the link to a user, who clicks it and sees the modified page.

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.

Content spoofing is when a website shows text that a user typed into a link, making it look like the website itself is saying it. Here, the error page displayed whatever text was in the URL, so an attacker could make the site appear to announce a hack or recommend another site. This tricks people because the message comes from a trusted domain.

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 Aswin K V

View all

1 more disclosed report, best first.

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.