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. Learn more

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 Learn

Learn about Cross-site Scripting vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-7926868
  • published11 Sept 2024
  • disclosed10 Sept 2024
  • creditAdamKorcz

Introduced: 10 Sep 2024

CVE-2024-43796  (opens in a new tab)
CWE-79  (opens in a new tab)

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