How I Chained a Simple Text Injection with OAuth Misconfiguration on NASA
The OAuth login flow on a NASA research subdomain lacked a state parameter, allowing an attacker to force a victim into the attacker's account. Combined with a text injection in the username field on the identity provider, the attacker could display a phishing message to the victim after the forced login.
Published on insomnia-x.medium.com
In this blog, I’ll describe how I discovered a text injection vulnerability on NASA’s platform and chained it with an OAuth misconfiguration. This combination elevated the bug’s severity from Not Applicable to a valid vulnerability.
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 OAuth implementation omitted the state parameter, and the username field lacked input validation, allowing reflected text injection.
Impact
An attacker could force a victim to log into the attacker's account and then display a convincing phishing message, potentially leading the victim to enter credentials on a fake site.
What the attacker needed
Victim clicks a crafted link; attacker has an account on the identity provider
The fix
The issues were fixed by adding proper input validation on the identity provider and including the missing state parameter in the OAuth flow.
How it was found
- Create an account on the identity provider domain and log in.
- Enter arbitrary text in the username field, which is reflected in the UI.
- Visit the second domain and observe it uses OAuth from the first domain.
- Check the OAuth requests and note the absence of a state parameter.
- Craft a login link with a code parameter to force a victim into the attacker's account.
- Register a username containing a phishing message that will be shown after the forced login.
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.
OAuth is a way for one website to let you log in using another website's account. A missing 'state' value means the login process can be tricked so that you end up logged into someone else's account without knowing. Separately, the username field accepted any text, so an attacker could put a fake warning there that the victim would see after being logged in.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.