Skip to content
Misconfiguration Disclosed report Intermediate

YAML schema injection risk in Swagger UI via schema_url parameter at developers.cloudflare.com

Swagger UI on Cloudflare's developer documentation accepted a remote schema URL without validating it against an allowlist, so an attacker could point it at a YAML schema they hosted. A victim who copied request examples from the resulting docs and sent them could be exposed to phishing.

aliend89 Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Paid in 27 days
  • Disclosed after 50 days

Summary by the program

Cloudflare relies on Swagger to present API Docs within our Developer Documentation. Swagger incorporates a feature known as "schema_url," which permits the rendering of a YAML schema from a remote URL. However, a security issue was identified in our Swagger's implementation due to absence of validation on the allowed URL list. This vulnerability could be exploited by an attacker who crafts a URL to load a schema from a remote URL they control. The attacker could then share this URL with a potential victim. To exploit this vulnerability, the victim would need to manually copy the request examples from the API docs and send them directly, which could result in exposing themselves to a phishing attack. Despite the potential risk, the likelihood of successful exploitation remains very low.

The original report as published on HackerOne, by aliend89. 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

Impact

Exploitation was considered very unlikely and required the victim to manually copy request examples from the docs and send them, which could lead to phishing.

What the attacker needed

Attacker hosts a YAML schema; victim copies examples from the docs

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 is a tool that displays API documentation, and it can load a description file (a schema) from another web address. Here the site did not check which addresses were allowed, so someone could make the docs load a file from a server they controlled. The danger was that a person copying example requests from those docs might be tricked into sending them somewhere harmful.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by aliend89

View all

1 more disclosed report, best first.

More from Cloudflare Public Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.