Skip to content

[Snyk] Security upgrade parse-server from 5.2.1 to 9.0.0#70

Open
skmezanul wants to merge 1 commit intomasterfrom
snyk-fix-8312cc0d588d5e2ae042a1bdbc15117a
Open

[Snyk] Security upgrade parse-server from 5.2.1 to 9.0.0#70
skmezanul wants to merge 1 commit intomasterfrom
snyk-fix-8312cc0d588d5e2ae042a1bdbc15117a

Conversation

@skmezanul
Copy link
Copy Markdown
Owner

snyk-top-banner

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

Snyk changed the following file(s):

  • package.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
critical severity Predictable Value Range from Previous Values
SNYK-JS-FORMDATA-10841150
  791  
critical severity Interpretation Conflict
SNYK-JS-NODEFORGE-14114940
  751  
high severity Prototype Pollution
SNYK-JS-PARSE-13551630
  746  
high severity Uncontrolled Recursion
SNYK-JS-NODEFORGE-14125745
  721  
medium severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-BABELRUNTIMECOREJS3-9397696
  666  
high severity Prototype Pollution
SNYK-JS-PARSE-13053302
  654  
medium severity Server-side Request Forgery (SSRF)
SNYK-JS-REQUEST-3361831
  646  
medium severity Prototype Pollution
SNYK-JS-TOUGHCOOKIE-5672873
  646  
medium severity Integer Overflow or Wraparound
SNYK-JS-NODEFORGE-14125097
  601  
medium severity Cross-site Scripting (XSS)
SNYK-JS-PARSESERVER-14423948
  551  

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:

🦉 Regular Expression Denial of Service (ReDoS)
🦉 Predictable Value Range from Previous Values
🦉 Integer Overflow or Wraparound
🦉 More lessons are available in Snyk Learn

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @skmezanul, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request, automatically generated by Snyk, aims to bolster the project's security by performing a significant upgrade of the parse-server dependency. Moving from version "5.2.1" to "9.0.0" is intended to mitigate a total of 10 identified vulnerabilities, including several critical and high-severity issues, thereby improving the application's overall security posture.

Highlights

  • Dependency Upgrade: The parse-server dependency has been upgraded from version "5.2.1" to "9.0.0".
  • Security Fixes: This upgrade addresses and fixes 10 identified vulnerabilities, including critical, high, and medium severity issues, significantly enhancing the project's security.
  • Automated Pull Request: This pull request was automatically generated by Snyk to proactively resolve security concerns.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request, automatically generated by Snyk, upgrades parse-server from v5.2.1 to v9.0.0 to fix several security vulnerabilities. While this is an important security update, it's a major version jump that introduces significant breaking changes. The application will likely fail to start without manual intervention. Key issues include a new minimum Node.js version requirement (>=18.18.0) and a mandatory change in the database connection configuration, as databaseURI is deprecated. Please review the detailed comment for the necessary code modifications and consult the official parse-server migration guides before merging.

Comment thread package.json
"express": "4.18.1",
"parse": "3.4.2",
"parse-server": "5.2.1"
"parse-server": "9.0.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Upgrading parse-server from version 5.2.1 to 9.0.0 is a major update that includes several significant breaking changes. This automated upgrade by Snyk resolves security vulnerabilities but is very likely to break your application without manual code changes.

Here are some critical breaking changes you need to address:

  1. Node.js Version Requirement: parse-server v9.0.0 requires Node.js version >= 18.18.0. Your package.json currently specifies "node": ">=12.22.10 <19". You must update your runtime environment to a compatible Node.js version and update the engines field in package.json accordingly to prevent deployment failures or runtime errors.

  2. Database Configuration: The databaseURI configuration option for MongoDB was removed in Parse Server v7.0.0. You must migrate to using databaseAdapter. Your current configuration in index.js uses databaseURI and will cause the server to fail on startup.

    You'll need to modify index.js to use the databaseAdapter. Here is an example:

    // In index.js
    const { MongoAdapter } = require('parse-server/lib/Adapters/Database/Mongo/MongoAdapter');
    
    const config = {
      databaseAdapter: new MongoAdapter({
        uri: databaseUri || 'mongodb://localhost:27017/dev',
      }),
      // ... other config
    };
  3. Other Breaking Changes: There are many other breaking changes across versions 6, 7, 8, and 9. It is crucial to review the official migration guides for each major version to identify all potential issues and required updates. You can find the guide in the parse-server repository (MIGRATION_GUIDE.md).

Given the extent of these changes, please carefully test your application after making the necessary updates.

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