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.
CVE-2018-25031
This medium-severity CVE scores 4.3 under NVD CVSS v3. EPSS exploit probability: 42.3%, top 1% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- Lower severity and no public exploit yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 4.3
- EG Score
- 4.3(medium)
- EPSS
- 98.6%
- KEV
- Not listed
Published
March 11, 2022
Last Modified
November 21, 2024
References (8)
- cve@mitrehttps://github.com/swagger-api/swagger-ui/issues/4872
- cve@mitrehttps://github.com/swagger-api/swagger-ui/releases/tag/v4.1.3
- cve@mitrehttps://security.netapp.com/advisory/ntap-20220407-0004/
- cve@mitrehttps://security.snyk.io/vuln/SNYK-JS-SWAGGERUI-2314885
- af854a3a-2127-422b-91ae-364da2661108https://github.com/swagger-api/swagger-ui/issues/4872
- af854a3a-2127-422b-91ae-364da2661108https://github.com/swagger-api/swagger-ui/releases/tag/v4.1.3
- af854a3a-2127-422b-91ae-364da2661108https://security.netapp.com/advisory/ntap-20220407-0004/
- af854a3a-2127-422b-91ae-364da2661108https://security.snyk.io/vuln/SNYK-JS-SWAGGERUI-2314885
Affected Packages
(2 across 2 ecosystems)
Maven(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| org.webjars:swagger-ui | 2.0.12 ... 4.1.2 (141 versions) | 4.1.3 | — |
npm(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| swagger-ui | — | 4.1.3 | — |
Weakness Classification(3)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 10× in last 7d / 39× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-22 22:15 UTCEG score recompute
- 2026-07-22 14:05 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-17 20:59 UTCOSV refresh
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 22:26 UTCEPSS rescore
- 2026-07-13 06:10 UTCEPSS rescore
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-05 02:27 UTCEPSS rescore
- 2026-07-02 16:54 UTCEPSS rescore
- 2026-07-01 15:03 UTCEPSS rescore
Show 48 moreShow fewer
- 2026-07-01 15:03 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-29 18:53 UTCOSV refresh
- 2026-06-29 14:03 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-15 17:45 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-12 07:06 UTCOSV refresh
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 01:48 UTCEG score recompute
Publicly available exploits
(3 references)Working exploit code is in the public domain (3 GitHub PoCs). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoCmathis2001/CVE-2018-25031First seen Jun 28, 2023
CVE-2018-25031 tests
Open source ↗ - GitHub PoCrafaelcintralopes/SwaggerUI-CVE-2018-25031First seen Apr 14, 2023
Exploit Swagger UI - User Interface (UI) Misrepresentation of Critical Information (CVE-2018-25031)
Open source ↗ - GitHub PoCafine-com/CVE-2018-25031First seen May 26, 2022
.json and .yaml files used to exploit CVE-2018-25031
Open source ↗
Related CVEs(same CWE)
Same CWE
10 shownCWE-20 · CWE-918
Frequently asked(5)
What is CVE-2018-25031?
When was CVE-2018-25031 disclosed?
Is CVE-2018-25031 actively exploited?
What is the CVSS score of CVE-2018-25031?
How do I remediate CVE-2018-25031?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2018-25031
Is Your Infrastructure Affected by CVE-2018-25031?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.