Cross-site Scripting Affecting org.webjars.npm:express package, versions [,4.20.0) [5.0.0-alpha.1,5.0.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.05% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JAVA-ORGWEBJARSNPM-7926868
  • published 11 Sep 2024
  • disclosed 10 Sep 2024
  • credit AdamKorcz

How to fix?

Upgrade org.webjars.npm:express to version 4.20.0, 5.0.0 or higher.

Overview

org.webjars.npm:express is a WebJar for express.

Affected versions of this package are vulnerable to Cross-site Scripting due to improper handling of user input in the response.redirect method. An attacker can execute arbitrary code by passing malicious input to this method.

Note

To exploit this vulnerability, the following conditions are required:

  1. The attacker should be able to control the input to response.redirect()

  2. express must not redirect before the template appears

  3. the browser must not complete redirection before:

  4. the user must click on the link in the template

References

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
5.1 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Active
  • Confidentiality (VC)
    None
  • Integrity (VI)
    Low
  • Availability (VA)
    None
  • Confidentiality (SC)
    Low
  • Integrity (SI)
    Low
  • Availability (SA)
    None