Property names are not escaped and allow XSS
To reproduce, point swagger-ui at a JSON schema file that uses a model with a property containing <script>alert(1)</script>. The script will execute. I've attached a sinatra server that demonstrates the issue by replacing the "photoUrls" property with "photoUrls<script>alert(1)</script>":
https://gist.github.com/joevennix/b2bc8c04fd74f2f5d2b2
Any update on when this might be fixed? Using a Content-Security-Policy header containing connect-src 'self' online.swagger.io mitigates this, but Internet Explorer is still vulnerable.
@danderson00 - please consider submitting a PR to fix the issue, but we'll try to look into it as soon as possible as well.
@fehguy is there an ETA for this issue's resolution?
Any day now
See https://github.com/swagger-api/swagger-ui/commit/a906cffea4550eaa5369e4933a50753213cf09df
Is there any CVE for this one?
FYI, this is also still being reported as not fixed on the nodesecurity.io advisory which is used by some dependency scanners like david-dm. Not sure how to report the version it is fixed in.
@fehguy what's the status here?
We've pushed out three close releases - 2.2.1, 2.2.2 and 2.2.3 handling all the known XSS issues we've had whether reported to us (publicly or otherwise) or with our own experience, including this one.
Should you find any new additional XSS issues, please open new tickets on those and we'll address them as soon as possible.
@bradygaster I contacted the node security folks and they've updated their page to show that 2.2.1 has this fixed.
Thanks for your work on this!
@fehguy thanks so much! got your email. looks like things are good.
Just an FYI a cve-2016-1000229 has been assigned to this issue.