Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Security upgrade express from 4.17.1 to 4.21.0 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m-mizutani
Copy link
Owner

snyk-top-banner

Snyk has created this PR to fix 4 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • lib/backend/package.json
  • lib/backend/package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Asymmetric Resource Consumption (Amplification)
SNYK-JS-BODYPARSER-7926860
  696  
medium severity Cross-site Scripting
SNYK-JS-EXPRESS-7926867
  541  
low severity Cross-site Scripting
SNYK-JS-SEND-7926862
  391  
low severity Cross-site Scripting
SNYK-JS-SERVESTATIC-7926865
  391  

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Cross-site Scripting

Copy link

octovy-dev bot commented Sep 12, 2024

✅ Fix Vulnerabilities

lib/backend/package-lock.json

CVE-2022-24999: express: "qs" prototype poisoning causes the hang of the node process (HIGH)
  • PkgName: qs
  • Installed Version: 6.7.0
  • Fixed Version: 6.10.3, 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, 6.2.4
  • Status: fixed
  • Severity: HIGH

Description

qs before 6.10.3, as used in Express before 4.17.3 and other products, allows attackers to cause a Node process hang for an Express application because an __ proto__ key can be used. In many typical Express use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as a[proto]=b&a[proto]&a[length]=100000000. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4 (and therefore Express 4.17.3, which has "deps: [email protected]" in its release description, is not vulnerable).

References

CVE-2024-43799: send: Code Execution Vulnerability in Send Library (MEDIUM)
  • PkgName: send
  • Installed Version: 0.17.1
  • Fixed Version: 0.19.0
  • Status: fixed
  • Severity: MEDIUM

Description

Send is a library for streaming files from the file system as a http response. Send passes untrusted user input to SendStream.redirect() which executes untrusted code. This issue is patched in send 0.19.0.

References

CVE-2024-43800: serve-static: Improper Sanitization in serve-static (MEDIUM)
  • PkgName: serve-static
  • Installed Version: 1.14.1
  • Fixed Version: 1.16.0, 2.1.0
  • Status: fixed
  • Severity: MEDIUM

Description

serve-static serves static files. serve-static passes untrusted user input - even after sanitizing it - to redirect() may execute untrusted code. This issue is patched in serve-static 1.16.0.

References

CVE-2024-45590: body-parser: Denial of Service Vulnerability in body-parser (HIGH)
  • PkgName: body-parser
  • Installed Version: 1.19.0
  • Fixed Version: 1.20.3
  • Status: fixed
  • Severity: HIGH

Description

body-parser is Node.js body parsing middleware. body-parser <1.20.3 is vulnerable to denial of service when url encoding is enabled. A malicious actor using a specially crafted payload could flood the server with a large number of requests, resulting in denial of service. This issue is patched in 1.20.3.

References

CVE-2024-29041: express: cause malformed URLs to be evaluated (MEDIUM)
  • PkgName: express
  • Installed Version: 4.17.1
  • Fixed Version: 4.19.2, 5.0.0-beta.3
  • Status: fixed
  • Severity: MEDIUM

Description

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 are affected by an open redirect vulnerability using malformed URLs. When a user of Express performs a redirect using a user-provided URL Express performs an encode using encodeurl on the contents before passing it to the location header. This can cause malformed URLs to be evaluated in unexpected ways by common redirect allow list implementations in Express applications, leading to an Open Redirect via bypass of a properly implemented allow list. The main method impacted is res.location() but this is also called from within res.redirect(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

References

CVE-2024-43796: express: Improper Input Handling in Express Redirects (MEDIUM)
  • PkgName: express
  • Installed Version: 4.17.1
  • Fixed Version: 4.20.0, 5.0.0
  • Status: fixed
  • Severity: MEDIUM

Description

Express.js minimalist web framework for node. In express < 4.20.0, passing untrusted user input - even after sanitizing it - to response.redirect() may execute untrusted code. This issue is patched in express 4.20.0.

References

CVE-2024-45296: path-to-regexp: Backtracking regular expressions cause ReDoS (HIGH)
  • PkgName: path-to-regexp
  • Installed Version: 0.1.7
  • Fixed Version: 1.9.0, 0.1.10, 8.0.0, 3.3.0
  • Status: fixed
  • Severity: HIGH

Description

path-to-regexp turns path strings into a regular expressions. In certain cases, path-to-regexp will output a regular expression that can be exploited to cause poor performance. Because JavaScript is single threaded and regex matching runs on the main thread, poor performance will block the event loop and lead to a DoS. The bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (.). For users of 0.1, upgrade to 0.1.10. All other users should upgrade to 8.0.0.

References

⚠️ All detected vulnerabilities

lib/backend/package-lock.json: (1)
  • CVE-2023-0842: ( xml2js ) node-xml2js: xml2js is vulnerable to prototype pollution
package-lock.json: (2)
  • CVE-2022-3517: ( minimatch ) nodejs-minimatch: ReDoS via the braceExpand function
  • CVE-2022-25883: ( semver ) nodejs-semver: Regular expression denial of service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants