Resource Injection - [████████]
Swagger UI before version 4.1.3 allowed a remote attacker to supply a crafted URL that made the interface load remote OpenAPI definitions, enabling spoofing and phishing on the trusted domain. An attacker could trick users into visiting a link that displayed attacker-controlled content under the legitimate host.
- Triaged in 10 hours
- Fixed in 8 days
- Disclosed after 3 months
Description:
Swagger UI before 4.1.3 could allow a remote attacker to conduct spoofing attacks. By persuading a victim to open a crafted URL, an attacker could exploit this vulnerability to display remote OpenAPI definitions.
Affected host: ██████████
████
Impact
A threat actor can abuse the domain through phishing by injecting the crafted payload to the vulnerable host. The attacker may send out phishing emails or messages containing links, tricking unsuspecting users into providing sensitive information such as login credentials, credit card details, or personal data.
It was possible for an attacker to craft a URL that could introduce a payload to be run in the application context. Opens a vector for phishing attacks by abusing the trusted names/domains of self-hosted instances.
System Host(s)
████████
Steps to Reproduce
Navigate to the endpoint that hosts the Swagger UI, and insert the payload through “?configUrl=” GET parameters as following:
█████?configUrl=█████████
Suggested Mitigation/Remediation Actions
Disable the feature of external import of definition files through Keep Swagger UI to its latest version
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 Swagger UI accepted a configUrl parameter that pointed to an external definition file without restricting it to trusted sources.
Impact
An attacker could abuse the trusted domain for phishing by displaying remote OpenAPI definitions, potentially tricking users into providing sensitive information.
What the attacker needed
Victim clicks a crafted link; Swagger UI before 4.1.3
The fix
The feature for external import of definition files should be disabled and Swagger UI should be updated to the latest version.
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.
Swagger UI is a tool that displays API documentation in a web page. This version let anyone change which definition file the page loads by adding a special parameter to the URL, so an attacker could make the page show their own fake content on the real company's website. That makes phishing links more convincing because the address looks trustworthy.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.