CVE-2018-25031
JavaScript vulnerability analysis and mitigation

Overview

Swagger UI 4.1.2 and earlier contains a vulnerability that could allow remote attackers to conduct spoofing attacks. The vulnerability was initially disclosed on March 11, 2022, and affects all versions of Swagger UI up to and including 4.1.2. While it was initially claimed to be resolved in version 4.1.3, third parties have indicated the vulnerability persists in that version and possibly others (CVE Details, MITRE).

Technical details

The vulnerability stems from the ability to override hard-coded schema files using the ?url parameter in SwaggerUI. This functionality allows an attacker to display remote OpenAPI definitions by persuading a victim to open a crafted URL. The vulnerability has been assigned a CVSS v3.1 base score of 4.3 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N, indicating it requires user interaction but no privileges, and can potentially impact confidentiality (Snyk, Ubuntu).

Impact

When successfully exploited, this vulnerability can lead to disclosure of sensitive information. The URL parameter is particularly dangerous in environments where authentication or other sensitive information is used, as it could allow an attacker to trick users into leaking their login credentials by providing a similar schema file that sends authorization requests to an attacker-controlled server (GitHub Issue).

Mitigation and workarounds

The vulnerability was addressed in Swagger UI version 4.1.3 by disabling the functionality of reading config parameters from URL by default. To re-enable this functionality, users must explicitly set the new queryConfigEnabled core parameter to true. Organizations are advised to upgrade to version 4.1.3 or later and carefully consider the security implications before enabling URL parameter configuration (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-55182CRITICAL10
  • JavaScriptJavaScript
  • react
NoYesDec 03, 2025
CVE-2025-66401CRITICAL9.8
  • JavaScriptJavaScript
  • mcp-watch
NoNoDec 01, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66405MEDIUM6.9
  • JavaScriptJavaScript
  • @portkey-ai/gateway
NoYesDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management