How a Simple Google Dork Led Me to an XSS on Ford Motor Company &
A reflected cross-site scripting vulnerability existed in the search parameter of a Ford subdomain, where user input was reflected unencoded inside an HTML attribute. An attacker could execute arbitrary JavaScript in a victim's browser, potentially leading to cookie theft or session hijacking.
In this write-up, I will share my journey of discovering a Reflected Cross-Site Scripting (XSS) vulnerability on a subdomain of Ford Motor Company back in September 2021. This vulnerability allowed for the execution of arbitrary JavaScript code in the context of the user’s browser, which could lead to cookie theft or…
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
The application failed to properly sanitize or encode special characters in the search parameter before reflecting it into an HTML attribute.
Impact
A successful XSS attack could allow an attacker to perform session hijacking, phishing, defacement, or malware distribution.
What the attacker needed
Victim clicks a crafted link
The fix
The vulnerability was resolved, though the specific fix is not described.
How it was found
- Find a subdomain using a Google dork.
- Submit a unique string into the search field.
- Inspect the page source to locate the reflection inside the input value attribute.
- Inject a payload that breaks out of the attribute and closes the input tag.
- Confirm the context break by checking the source.
- Execute a script payload to trigger an alert box.
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.
Cross-site scripting (XSS) is when a website takes input from a user and puts it into a page without cleaning it, so an attacker can make the site run their own JavaScript. Here, the search box echoed back whatever was typed, and special characters like quotes and angle brackets were not encoded, so a script tag could be injected. This lets an attacker run code in another user's browser, which could steal their session.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.