Skip to content
XSS Disclosed report Beginner

Content injection via URL parameter.

The schema parameter in a URL is reflected into the page without proper sanitisation, allowing an attacker to inject HTML and JavaScript. This could let an attacker execute arbitrary script in a victim's browser or reveal PHP source code through error messages.

johnh4x0r Follow

Originally disclosed on HackerOne

  • Disclosed after 2.4 years

Hello,

The following URL is vulnerable to content & code injection.

https://labs.data.gov/dashboard/validate

https://labs.data.gov/dashboard/validate?schema=federal-v1.1&output=browser&datajson_url=https%3A%2F%2Flabs.data.gov%2Fdashboard%2Ftest%2Cjson&qa=true&as_sfid=AAAAAAX9aAk4zbcmVPVmNqK8IsF4fTqp5MWg0dD5EUW_RUCLRfQy-tInawCjs5MguiO4r0s2DOxw7A6eFsyDLtE7VwB-dOBSvwUCyh8ZDcmwEgXTbAhd65RVagmnyBes3N9JTgo%3D&as_fid=6351beaa742e567d719465625c857fb4af3647b5

The schema parameter in the above URL is vulnerable to injection.

Example...

https://labs.data.gov/dashboard/validate?schema=test%3C/td%3E%3C/table%3E%3Ctable%3E%3Cbr%3E%3CIMG/SRC=%220%22%3E%3Ca+href=%22test%22%3EThis%20is%20a%20test%20code%20injected%3C/a%3E%3Ctr%20height=1000%3E&output=browser&datajson_url=https%3A%2F%2Flabs.data.gov%2Fdashboard%2Fvalidate&qa=true&as_sfid=AAAAAAUed3Nkn6QD8xXFoaXpXFo15KAcBtnXLB2sMi3sDQg56-En7xzPW-DkRPCwWwWWr72IB5MBYVnBw5VdRcZ3mf6t0KCdTCE1Ubo8_xdNn8bT62h84O-zg4KswH-QCyULoN0%3D&as_fid=18ac90d3c3c43ee6b696ad0376dcceda949b51be

Also injecting something like revels PHP source error msg....

https://labs.data.gov/dashboard/validate?schema=test%3C/td%3E%3C/table%3E%3Ctable%3E%3Cbr%3E%3CIMG/SRC=%22JaVaScrip%3Cscript%3ET:alert(%27XSS%27)%22%3E%3Ca+href=%22test%22%3Etest%3C/a%3E%3CIMG/SRC=%22javascript:alert(1);%22%3E%3Ctr%20height=1000%3E&output=browser&datajson_url=https%3A%2F%2Flabs.data.gov%2Fdashboard%2Fvalidate&qa=true&as_sfid=AAAAAAUed3Nkn6QD8xXFoaXpXFo15KAcBtnXLB2sMi3sDQg56-En7xzPW-DkRPCwWwWWr72IB5MBYVnBw5VdRcZ3mf6t0KCdTCE1Ubo8_xdNn8bT62h84O-zg4KswH-QCyULoN0%3D&as_fid=18ac90d3c3c43ee6b696ad0376dcceda949b51be

The schema parameter in the URL should be further sanitised from characters like " < > /.

The original report as published on HackerOne, by johnh4x0r. 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 application reflects the schema parameter into the HTML output without encoding or validating it.

What the attacker needed

Victim clicks a crafted link

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.

The 'schema' parameter is not sanitised, so an attacker can add HTML tags or JavaScript to a crafted link. This is called cross-site scripting (XSS).

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 GSA Bounty

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.