flasgger / flasgger

Easy OpenAPI specs and Swagger UI for your Flask API

Home Page:http://flasgger.pythonanywhere.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swagger interface allows the injection of JavaScript code

catalinapopa-uipath opened this issue · comments

Hello,
I've come across this security issue with flasgger.

Swagger interface allows the injection of JavaScript code, which can be injected using the remote Swagger configUrl and url. As a result, someone could execute arbitrary JavaScript code in the context of the domain that hosts the swagger file.

Examples:

I've tried to remove the query parameters and to reset the values for queryConfig from flasgger\ui3\static\swagger-ui-bundle.js.map
but did not help.

How can I remove completely query parameters from swagger?