Skip to content
XSS Write-up Beginner

Reflected Xss Tag Attribute Src

The application takes a user-supplied url parameter and places it directly into the src attribute of an image tag without any validation. An attacker could craft a link that causes script to run in a victim's browser, a reflected cross-site scripting issue.

Erdemstar Follow

Published on systemweakness.com

Hello friends, today I will show you the steps of detecting a vulnerability that I encountered in Web Application Security Tests in my project named Saka Reflected XSS (Tag Attribute src) and exploiting this vulnerability.

Erdemstar, on systemweakness.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 url parameter is concatenated into the image src attribute without encoding or validation, so quote characters can break out of the attribute.

Impact

An attacker could run script in a victim's browser through a crafted link, though the text does not demonstrate any concrete harm beyond the alert-style proof.

What the attacker needed

Victim clicks a crafted link; no account needed

How it was found

  1. Open the application and press the Attack button to reach the test page.
  2. Enter a url value in the image url field and submit it.
  3. Observe the GET request carrying the url parameter in the query string.
  4. Add characters that the browser will interpret to the url value.
  5. Send the crafted request and confirm the value is reflected in the image src attribute.

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.

A web page can build part of itself from values in the address bar. Here the site copied a value from the address straight into an image tag without checking it. By adding special characters, an attacker can break out of the image tag and make the browser run their own script, which is called cross-site scripting.

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 Erdemstar

View all

4 more disclosed reports, 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.