NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
☕
☕ Maven📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2018-25031 — swagger-ui

MEDIUMFix: swagger-api/swagger-ui#7697

CVE-2018-25031 is a medium-severity (CVSS 4.3) Improper Input Validation vulnerability in org.webjars:swagger-ui. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for org.webjars:swagger-ui — see the affected versions and patch details below.

Spoofing attack in swagger-ui

Also known asGHSA-cr3q-pqgq-m8c2
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
1 known
Exploitation data as of Nov 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2018-25031.

EPSS Exploitation Probability

via FIRST.org ↗
42.3%probability of exploitation in next 30 days
High Risk0.00%
Lower risk than most CVEs99th percentile — riskier than 99% of all scored CVEsHighest risk
30.9%51.2%71.5%91.8%80.4%42.3%42.3%42.3%Jun 26Nov 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

167other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
swagger-uinpm
160Kdownloads / week

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 Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
☕Mavenorg.webjars:swagger-uiall versions4.1.3org.webjars:swagger-ui:4.1.3
📦npmswagger-uiall versions4.1.3npm install swagger-ui@4.1.3

Affected Products

1 product · 1 configurations
Application
swagger uismartbear
< 4.1.3
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.webjars:swagger-ui, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update org.webjars:swagger-ui to 4.1.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-25031 is resolved across your whole dependency graph.

  3. Workarounds

    Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2018-25031 in your dependencies?

Find it across Maven, npm, including transitive dependencies.

CVE-2018-25031: swagger-ui — Fixed in 4.1.3