Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property names are not escaped and allow XSS #1865

Closed
joevennix opened this issue Jan 13, 2016 · 13 comments
Closed

Property names are not escaped and allow XSS #1865

joevennix opened this issue Jan 13, 2016 · 13 comments
Assignees
Milestone

Comments

@joevennix
Copy link
Contributor

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

@danderson00
Copy link

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.

@webron
Copy link
Contributor

webron commented Jul 29, 2016

@danderson00 - please consider submitting a PR to fix the issue, but we'll try to look into it as soon as possible as well.

@bradygaster-zz
Copy link

@fehguy is there an ETA for this issue's resolution?

@fehguy
Copy link
Contributor

fehguy commented Aug 15, 2016

Any day now

@fehguy
Copy link
Contributor

fehguy commented Aug 23, 2016

See a906cff

@fehguy fehguy closed this as completed Aug 23, 2016
@fehguy fehguy added this to the v2.2.1 milestone Aug 23, 2016
@hoomanb1
Copy link

Is there any CVE for this one?

@danderson00
Copy link

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.

@bradygaster-zz
Copy link

@fehguy what's the status here?

@webron
Copy link
Contributor

webron commented Sep 14, 2016

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.

@fehguy
Copy link
Contributor

fehguy commented Sep 14, 2016

@bradygaster I contacted the node security folks and they've updated their page to show that 2.2.1 has this fixed.

@danderson00
Copy link

Thanks for your work on this!

@bradygaster-zz
Copy link

@fehguy thanks so much! got your email. looks like things are good.

@hoomanb1
Copy link

hoomanb1 commented Oct 14, 2016

Just an FYI a cve-2016-1000229 has been assigned to this issue.

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Dec 19, 2024
as per swagger-api/swagger-ui#1865
NVD tracks this CVE as version-less.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants