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 4.1.2 and earlier 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. Note: This was originally claimed to be resolved in 4.1.3. However, third parties have indicated this is not resolved in 4.1.3 and even occurs in that version and possibly others.
Description
Exploit Swagger UI - User Interface (UI) Misrepresentation of Critical Information (CVE-2018-25031)
Readme
# Exploit Swagger UI - CVE-2018-25031
Exploit Swagger UI - User Interface (UI) Misrepresentation of Critical Information (CVE-2018-25031).

This exploit checks whether the Swagger UI used is susceptible to exploitation of the User Interface (UI) Misrepresentation of Critical Information vulnerability.

## Requirements
- Python 3
- Selenium
- Chrome Webdriver

## First use
Install Selenium
```
pip install selenium 
```
Clone the repository
```
git clone https://github.com/rafaelcintralopes/SwaggerUI-CVE-2018-25031.git
```
Change web browser driver path
```
drive_service = Service("C:/chromedriver.exe")
```

## Usage
```
python swagger-exploit.py https://[swagger-page].com
```

## References
- [Snyk](https://security.snyk.io/vuln/SNYK-JS-SWAGGERUI-2314885)
- [CVE-2018-25031](https://www.cve.org/CVERecord?id=CVE-2018-25031)
File Snapshot

[4.0K] /data/pocs/93eaed7f4b42a848f2f2563cad74a2f3e65dfd44 ├── [ 833] README.md └── [2.2K] swagger-exploit.py 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →