What’s Vulnerable › Vulnerabilities
CVE-2018-25031
- Severity: medium (CVSS 4.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 42.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-03-11 · updated 2026-06-17
- Weakness: CWE-20
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.
Affected products
- fastify-swagger-ui: before 4.1.3 — fixed in 4.1.3
How to fix
Upgrade to a fixed version: fastify-swagger-ui 4.1.3. Check the vendor advisory for mitigations.
References
- https://github.com/swagger-api/swagger-ui/issues/4872
- https://github.com/swagger-api/swagger-ui/releases/tag/v4.1.3
- https://security.netapp.com/advisory/ntap-20220407-0004/
- https://security.snyk.io/vuln/SNYK-JS-SWAGGERUI-2314885
- https://github.com/swagger-api/swagger-ui/issues/4872
- https://github.com/swagger-api/swagger-ui/releases/tag/v4.1.3
- https://security.netapp.com/advisory/ntap-20220407-0004/
- https://security.snyk.io/vuln/SNYK-JS-SWAGGERUI-2314885
Get alerted when CVE-2018-25031 or the next vulnerability affects your stack