-
Notifications
You must be signed in to change notification settings - Fork 65
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
Update Discord Link + Fix 6 Security Vulnerabilities. #1366
Conversation
This needs to be done on casperlabs.io website. https://discord.com/invite/casperblockchain The above discord link must be used.
Upgrade Vulnerable Dependencies for Security Enhancements This commit updates our project dependencies to address several critical and medium-severity security vulnerabilities: - **Regular Expression Denial of Service (ReDoS) in `trim` (CVE-2020-7753)**: Upgraded to `[email protected]` to mitigate a vulnerability allowing attackers to cause application outages. More details at [CVE-2020-7753](https://nvd.nist.gov/vuln/detail/CVE-2020-7753). - **Cross-Site Request Forgery (CSRF) in `axios` (CVE-2023-45857)**: Resolved by updating to `[email protected]`, addressing the CSRF vulnerability that could lead to unauthorized actions. Further information is available at [CVE-2023-45857](https://nvd.nist.gov/vuln/detail/CVE-2023-45857). - **Prototype Pollution in `axios`**: Fixed by upgrading to `[email protected]`, preventing malicious inputs from altering object prototypes and ensuring data integrity. - **Regular Expression Denial of Service (ReDoS) in `axios`**: Addressed by updating to `[email protected]`, safeguarding the application against denial of service attacks through specially crafted strings. ### Adjustments: - Modified `package.json` and `yarn.lock` files to upgrade vulnerable dependencies to secure versions. ### Note for Yarn [zero-installs](https://yarnpkg.com/features/zero-installs) Users: This update does not directly modify the `.yarn/cache/` directory. Users leveraging Yarn's zero-installs feature are advised to run `yarn` to refresh the cache and ensure compatibility with these security updates. For those not using zero-installs, project workflows remain unaffected. By proactively addressing these vulnerabilities, we enhance our application's security and resilience against potential threats.
@0xE69 @ACStoneCL, I will update the Discord links. I was waiting on confirmation from the Association. Please pull my updates once I merge the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a major version update for Docusaurus, it seems to require node
and npm
updates to run the site locally. In this case, some thorough testing needs to happen locally. Has this been completed? I tried making the proposed changes locally to test the site, and I am unable to bring it up.
All docusaurus/* versions should be updated to the 3.0 version.
The README should be updated as well.
The node version in package.json should probably be updated.
I am still working through the changes locally, but I wanted to share that this PR may need additional work.
@0xE69, I'm stuck, so I'm going to stop troubleshooting ATM. Here is what I have tried: dev...ipopescu:docs:1367_update_links. |
I will test locally and update you. |
One example of the error you're encountering is due to the use of https://cspr.live/ in the MDX file, which MDX is trying to parse as a JSX component or an HTML tag because it's enclosed in angle brackets (< and >). URLs don't conform to the naming conventions of JSX components or HTML tags, this causes a parsing error. To fix this error, you should format URLs as Markdown links rather than plain text enclosed in angle brackets. I have updated all pages and project builds with no errors. |
Further update and report to follow. |
Security Update - Addressing Critical and High Vulnerability IssuesSummaryThis Pull Request addresses multiple security vulnerabilities ranging from critical to medium severity within the project's dependencies. The updates mitigate risks associated with incomplete input validation, denial of service, cross-site request forgery, prototype pollution, open redirects, and cross-site scripting vulnerabilities. FixesThe following vulnerabilities have been fixed:
ImpactFailure to apply these updates leaves the application vulnerable to a range of attacks, including but not limited to, denial of service, unauthorized actions under the guise of legitimate users, and the execution of malicious scripts in the context of the user's browser session. ActionIt is strongly recommended to merge this PR at the earliest convenience to mitigate the identified security vulnerabilities. Following the merge, a thorough testing cycle is advised to ensure that the application maintains its functionality and integrity in light of the updates. |
I can run the site locally with the latest updates. However, I am seeing several wonky navigation issues (screenshots below). This change requires some additional dev support and testing time. |
@ipopescu Working on design bugs now. |
I've enabled Dependabot and it has created some PRs to address the @babel/traverse:
This PR to enable automated updates will create more, that should cover other mentioned issues: I will investigate on the remainder of them once the #1387 is merged |
The @babel/traverse library, identified in our yarn.lock file but not directly in package.json, is a transitive dependency. This means it's required by another dependency we use but not directly used in our code. Typically, @babel/traverse is part of the build process, aiding in code compilation and transformation. Therefore, it's unlikely to be present in our production code, especially for a static site like ours. The vulnerability (CVE-2023-45133) allows for arbitrary code execution during the compilation process with specially crafted malicious code. The risk mainly applies to scenarios where untrusted code is compiled. While this vulnerability is critical, its direct impact on a statically built and deployed site like yours on GitHub Pages may be limited, as the risk is more relevant during the build process rather than in the served static content. However, ensuring your build process is secure remains important. |
I've verified that all the other vulnerabilities are all transitive dependencies. By linking most of of yarn.lock file transitive dependencies with the package.json direct dependencies and going up the ladder, I could always end up in docusaurus main package. This potentially means that the mentioned vulnerabilities (where applicable) could end up leaking into the statically generated Javascript code part of the production build:
This is less likely to happen as it would require the attacker to build some code and somehow get it to our production site. In theory an external developer could send a PR with the supposedly specially crafted malicious code and get it past our review process.
From: GHSA-jchw-25xp-jwwc: Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.
|
For all the other vulnerabilities, I suppose we would have to upgrade docusaurus. Next thing I will do, is that I will find the next version that can be upgraded that covers everything without too much of a jump, so that we do not risk distrupting other things too much |
Thanks for your investigation and updates, @bradjohnl. |
I could verify that the Discord link has already been changed, so this PR would need to be rebased to reflect the actual content from the dev branch. |
@0xE69, any updates on this PR? It is getting old. |
Closing this PR due to inactivity. If the work still needs to be done, please open a new PR referencing this one. |
Upgrade Vulnerable Dependencies for Security Enhancements
This commit updates our project dependencies to address several critical and medium-severity security vulnerabilities:
[Removed for security] Please reach out to me on telegram @nexusnode
Adjustments:
package.json
andyarn.lock
files to upgrade vulnerable dependencies to secure versions.Note for Yarn zero-installs Users:
This update does not directly modify the
.yarn/cache/
directory. Users leveraging Yarn's zero-installs feature are advised to runyarn
to refresh the cache and ensure compatibility with these security updates. For those not using zero-installs, project workflows remain unaffected.By proactively addressing these vulnerabilities, we enhance our application's security and resilience against potential threats.
Further reviews to follow tomorrow.