Skip to content

Property names are not escaped and allow XSS #1865

@joevennix

Description

@joevennix

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions