Skip to content
XSS Write-up Beginner

A base64 encoded parameter.

A login error parameter accepted base64-encoded input that was decoded and reflected as HTML, allowing an attacker to inject arbitrary HTML into the page. The attacker could craft a link that, when visited, displays injected content such as a link to an external site.

Navneet Follow

Published on medium.com

Bounty$75 View original

It was a first/index page of a Subdomain of a public program ,which was a login page. I was uninterested to look for anything and about to close the page but somehow unintentionally entered the admin/admin in the login page and an error comes up above the login form which says wrong credentials, but the thing that…

Navneet, 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 decoded the base64-encoded parameter and inserted the result into the HTML without sanitising it.

Impact

An attacker could craft a link that, when visited, displays injected HTML content, such as a link to an external site, but script execution was blocked by a filter.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Enter admin/admin in the login form to trigger an error.
  2. Observe the errLogin parameter in the address bar containing a base64-encoded string.
  3. Decode the base64 string to see it contains HTML.
  4. Encode custom HTML into base64 and set it as the errLogin parameter value.
  5. Load the URL and see the HTML reflected above the login form.

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.

The website had a part of the address that showed an error message. It expected that part to be scrambled using a common encoding called base64. The site unscrambled it and put it directly on the page without cleaning it, so someone could put their own web code there and make the page show anything they wanted.

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 Navneet

View all

6 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.