A Go-based tool that detects Swagger UI versions and scans for associated vulnerabilities to help secure API documentation interfaces.
A comprehensive Swagger UI version detection and vulnerability scanner written in Go.
This tool is designed for security professionals, developers, and API maintainers to accurately identify the Swagger UI version deployed on web applications and detect known security vulnerabilities tied to those versions. It aids in proactive security assessments and vulnerability management of API documentation interfaces.
The tool requires Go 1.23+ and a Chrome/Chromium browser installed for headless JavaScript execution. Swagger UI version detection relies on heuristics and multiple methods but may not be 100% accurate; manual verification of findings is recommended before making security decisions.
Ensure Go 1.23 or higher is installed
Install Chrome or Chromium browser for headless detection
Run `go install -v github.com/Abhinandan-Khurana/go-pwn-swagger@latest` to install directly
Alternatively, clone the repository with `git clone https://github.com/Abhinandan-Khurana/go-pwn-swagger.git`
Navigate into the cloned directory with `cd go-pwn-swagger`
Install dependencies using `go mod tidy`
Build the binary with `go build -o go-pwn-swagger`
./go-pwn-swagger -url https://example.com/swagger-ui/
Scan a single URL for Swagger UI version and vulnerabilities
./go-pwn-swagger -file urls.txt -concurrency 10
Scan multiple URLs listed in a file with a concurrency level of 10
./go-pwn-swagger -url https://example.com/swagger-ui/ -output results.json
Scan a single URL and output the results in JSON format to a file
./go-pwn-swagger -url https://example.com/swagger-ui/ -verbose
Run a scan with verbose output enabled for detailed logging
./go-pwn-swagger -help
Display help information and usage instructions