Skip to content

← Public intelligence

npm package

swagger-ui

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

14 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 4.3npmAmendedPublished

    Spoofing attack in swagger-ui

    CVE-2018-25031 · GHSA-cr3q-pqgq-m8c2

    Affected
    • npm swagger-ui < 4.1.3
    Fixed in
    4.1.3· Vendor fix available
    Issue
    Swagger UI before 4.1.3 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.

    Recommended action: Upgrade to 4.1.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. UnratednpmAmendedPublished

    Server side request forgery in SwaggerUI

    GHSA-qrmm-w75w-3wpx

    Affected
    • npm swagger-ui < 4.1.3
    Fixed in
    4.1.3· Vendor fix available
    Issue
    SwaggerUI supports displaying remote OpenAPI definitions through the ?url parameter. This enables robust demonstration capabilities on sites like petstore.swagger.io, editor.swagger.io, and similar sites, where users often want to see what their OpenAPI definitions would look like rendered. However, this functionality may pose a risk for users who host their own SwaggerUI instances. In particular, including remote OpenAPI definitions opens a vector for phishing attacks by abusing the trusted names/domains of self-hosted instances. An example scenario abusing this functionality could take the following form: - https://example.com/api-docs hosts a version of SwaggerUI with ?url= query parameter enabled. - Users will trust the domain https://example.com and the contents of the OpenAPI definition. - A malicious actor may craft a similar OpenAPI definition and service that responds to the defined APIs at https://evildomain. - Users mistakenly click a phishing URL like…

    Recommended action: Upgrade to 4.1.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. UnratednpmAmendedPublished

    Cross-Site Scripting in swagger-ui

    GHSA-w992-2gmj-9xxj

    Affected
    • npm swagger-ui < 2.2.1
    Fixed in
    2.2.1· Vendor fix available
    Issue
    Versions of swagger-ui prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package allows HTML code in the swagger.apiInfo.description value without proper sanitization, which may allow attackers to execute arbitrary JavaScript. Recommendation Upgrade to version 2.2.1 or later.

    Recommended action: Upgrade to 2.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. UnratednpmAmendedPublished

    Cross-Site Scripting in swagger-ui

    GHSA-22q9-hqm5-mhmc

    Affected
    • npm swagger-ui < 2.2.1
    Fixed in
    2.2.1· Vendor fix available
    Issue
    Versions of swagger-ui prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to encode output in GET requests. The request is meant to respond with Content-Type application/json which does not trigger the vulnerability but if the web server changes the header to text/html it may allow attackers to execute arbitrary JavaScript. Recommendation Upgrade to version 2.2.1 or later.

    Recommended action: Upgrade to 2.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. UnratednpmAmendedPublished

    Cross-Site Scripting in swagger-ui

    GHSA-vp93-gcx5-4w52

    Affected
    • npm swagger-ui < 2.2.1
    Fixed in
    2.2.1· Vendor fix available
    Issue
    Versions of swagger-ui prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize JSON schemas, allowing attackers to execute arbitrary JavaScript using <script tags in the method descriptions. Recommendation Upgrade to version 2.2.1 or later.

    Recommended action: Upgrade to 2.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Medium, CVSS 6.5npmAmendedPublished

    Cross-Site Scripting in swagger-ui

    GHSA-4f9m-pxwh-68hg

    Affected
    • npm swagger-ui < 3.20.9
    Fixed in
    3.20.9· Vendor fix available
    Issue
    Versions of swagger-ui prior to 3.20.9 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize URLs used in the OAuth auth flow, which may allow attackers to execute arbitrary JavaScript. Recommendation Upgrade to version 3.20.9 or later.

    Recommended action: Upgrade to 3.20.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  7. Medium, CVSS 6.5npmAmendedPublished

    Cross-Site Scripting in swagger-ui

    GHSA-388g-jwpg-x6j4

    Affected
    • npm swagger-ui < 3.0.13
    Fixed in
    3.0.13· Vendor fix available
    Issue
    Versions of swagger-ui prior to 3.0.13 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize YAML files imported from URLs or copied-pasted. This may allow attackers to execute arbitrary JavaScript. Recommendation Upgrade to version 3.0.13 or later.

    Recommended action: Upgrade to 3.0.13 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. UnratednpmAmendedPublished

    Cross-Site Scripting in swagger-ui

    GHSA-g336-c7wv-8hp3

    Affected
    • npm swagger-ui < 2.2.1
    Fixed in
    2.2.1· Vendor fix available
    Issue
    Affected versions of swagger-ui are vulnerable to cross-site scripting via the url query string parameter. Recommendation Update to 2.2.1 or later.

    Recommended action: Upgrade to 2.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  9. UnratednpmAmendedPublished

    Cross-Site Scripting in swagger-ui

    CVE-2016-1000233 · GHSA-mrx7-8hxf-f853

    Affected
    • npm swagger-ui < 2.2.1
    Fixed in
    2.2.1· Vendor fix available
    Issue
    Affected versions of swagger-ui are vulnerable to cross-site scripting. This vulnerability exists because swagger-ui automatically executes external Javascript that is loaded in via the url query string parameter when a Content-Type: application/javascript header is included. An attacker can create a server that replies with a malicious script and the proper content-type, and then craft a swagger-ui URL that includes the location to their server/script in the url query string parameter. When viewed, such a link would execute the attacker's malicious script. Recommendation Update to 2.2.1 or later.

    Recommended action: Upgrade to 2.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  10. UnratednpmAmendedPublished

    Cross-Site Scripting in swagger-ui

    CVE-2016-5682 · GHSA-p239-93f7-h6xf

    Affected
    • npm swagger-ui <= 2.2.0
    Fixed in
    2.2.1· Vendor fix available
    Issue
    Affected versions of swagger-ui contain a cross-site scripting vulnerability in the key names of a specific nested object in the JSON document. Proof of Concept The vulnerable object structure is: Malicious JSON documents can be loaded in by providing a URL to them in the url query string parameter. Recommendation Update to version 2.2.1 or later.

    Recommended action: Upgrade to 2.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  11. UnratednpmAmendedPublished

    Cross-Site Scripting in swagger-ui

    CVE-2016-1000226 · GHSA-7f59-x49p-v8mq

    Affected
    • npm swagger-ui < 2.2.1
    Fixed in
    2.2.1· Vendor fix available
    Issue
    Affected versions of swagger-ui are vulnerable to cross-site scripting in both the consumes and produces parameters of the swagger JSON document for a given API. Additionally, swagger-ui allows users to load arbitrary swagger JSON documents via the query string parameter url, allowing an attacker to exploit this attack against any user that the attacker can convince to visit a crafted link. Proof of Concept Recommendation Update to version 2.2.1 or later.

    Recommended action: Upgrade to 2.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  12. Critical, CVSS 9.3npmAmendedPublished

    Cross-site scripting in Swagger-UI

    CVE-2019-17495 · GHSA-c427-hjc3-wrfw

    Affected
    • npm swagger-ui < 3.23.11
    Fixed in
    3.23.11· Vendor fix available
    Issue
    A Cascading Style Sheets (CSS) injection vulnerability in Swagger UI before 3.23.11 allows attackers to use the Relative Path Overwrite (RPO) technique to perform CSS-based input field value exfiltration, such as exfiltration of a CSRF token value. In other words, this product intentionally allows the embedding of untrusted JSON data from remote servers, but it was not previously known that <style@import within the JSON data was a functional attack method.

    Recommended action: Upgrade to 3.23.11 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  13. Medium, CVSS 4.3npmAmendedPublished

    Reverse Tabnapping in swagger-ui

    GHSA-x9p2-fxq6-2m5f

    Affected
    • npm swagger-ui < 3.18.0
    Fixed in
    3.18.0· Vendor fix available
    Issue
    Versions of swagger-ui prior to 3.18.0 are vulnerable to Reverse Tabnapping. The package uses target='blank' in anchor tags, allowing attackers to access window.opener for the original page. This is commonly used for phishing attacks. Recommendation Upgrade to version 3.18.0 or later.

    Recommended action: Upgrade to 3.18.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →