-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(deps): update dependency next to v14.2.15 [security] #313
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for next-enterpriseThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
85.04 KB (🟢 131 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Three Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/_not-found/page |
873 B (🟢 2 B) |
85.9 KB |
/layout |
2.71 KB (🟢 1 B) |
87.75 KB |
/page |
138 B (🟢 1 B) |
85.18 KB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by undefined% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
7d0407d
to
03300a3
Compare
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.
Code review by ChatGPT
03300a3
to
0ca5588
Compare
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.
Code review by ChatGPT
version "2.8.1" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" | ||
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== | ||
|
||
tsutils@^3.21.0: | ||
version "3.21.0" | ||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" |
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.
Code Review Summary
The code patch appears to update the dependencies of a project, primarily changing versions for various packages associated with Next.js to a newer version (from 14.2.3
to 14.2.20
for several packages). Here are some observations regarding potential bugs and suggestions for improvements.
Observations
-
Version Upgrades:
- The patch updates package versions appropriately across several
@next
packages. It looks like a consistent upgrade from14.2.3
to14.2.20
was made.
- The patch updates package versions appropriately across several
-
Integrity Hashes:
- The integrity hashes for the packages were also changed to match the new versions, ensuring that the content of the packages cannot be tampered with. This is good practice.
-
Caniuse-lite Updates:
- The
caniuse-lite
package was updated, which is also a good practice since it provides the latest browser compatibility data.
- The
-
Redundant Dependency Definitions:
- By defining
nanoid@^3.3.6
andnanoid@^3.3.7
, but updatingnanoid@^3.3.6
to3.3.8
, there's possible redundancy. It might be worthwhile to clarify the need for maintaining both definitions.
- By defining
Potential Bug Risks
-
Compatibility:
- Upgrading versions (especially in large libraries like Next.js) could lead to breaking changes. Ensure that the rest of the codebase is compatible with version
14.2.20
functionalities.
- Upgrading versions (especially in large libraries like Next.js) could lead to breaking changes. Ensure that the rest of the codebase is compatible with version
-
Testing:
- Make sure that adequate test coverage exists. If the new versions introduce breaking changes or depreciated functionalities, this could lead to runtime errors.
-
Locking Version Ranges:
- In some cases, using caret (
^
) in version specifications could inadvertently allow more recent (potentially breaking) updates. Consider locking versions strictly when stability is paramount.
- In some cases, using caret (
-
Dependencies that Provide Peer Dependencies:
- Not checking the peer dependencies of upgraded packages can lead to issues if other packages you rely on depend on mismatched versions.
Improvement Suggestions
-
Use of yarn.lock or package-lock.json:
- Ensure that the lock file (if using Yarn or npm) is updated to prevent discrepancies between environments.
-
Dependency Cleanup:
- Consider documenting or commenting on the reason behind upgrading specific dependencies, as well as noting any removed or deprecated packages.
-
Run Automated Tests:
- After the update, make sure to conduct regression testing to detect any issues early.
-
Monitor the Changelog:
- Regularly check the changelogs of critical dependencies, like Next.js, to be aware of any breaking changes introduced in new versions.
-
Semantic Versioning Understanding:
- Clarity on how versioning works (semantic versioning) can make future updates more predictable; using
~
for minor updates and^
for major updates can help balance upgrade risks and benefits.
- Clarity on how versioning works (semantic versioning) can make future updates more predictable; using
Conclusion
The changes you’ve made mainly focus on keeping dependencies up to date, which is crucial for security and performance. However, do ensure proper testing and compatibility checks to mitigate any risk associated with such upgrades. Additionally, consider the points made above to improve maintainability and stability in the project's dependency management.
This PR contains the following updates:
14.2.3
->14.2.15
Denial of Service condition in Next.js image optimization
CVE-2024-47831 / GHSA-g77x-44xx-532m
More information
Details
Impact
The image optimization feature of Next.js contained a vulnerability which allowed for a potential Denial of Service (DoS) condition which could lead to excessive CPU consumption.
Not affected:
next.config.js
file is configured withimages.unoptimized
set totrue
orimages.loader
set to a non-default value.Patches
This issue was fully patched in Next.js
14.2.7
. We recommend that users upgrade to at least this version.Workarounds
Ensure that the
next.config.js
file has eitherimages.unoptimized
,images.loader
orimages.loaderFile
assigned.Credits
Brandon Dahler (brandondahler), AWS
Dimitrios Vlastaras
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Next.js Cache Poisoning
CVE-2024-46982 / GHSA-gp8f-8m3g-qvj9
More information
Details
Impact
By sending a crafted HTTP request, it is possible to poison the cache of a non-dynamic server-side rendered route in the pages router (this does not affect the app router). When this crafted request is sent it could coerce Next.js to cache a route that is meant to not be cached and send a
Cache-Control: s-maxage=1, stale-while-revalidate
header which some upstream CDNs may cache as well.To be potentially affected all of the following must apply:
pages/dashboard.tsx
notpages/blog/[slug].tsx
The below configurations are unaffected:
Patches
This vulnerability was resolved in Next.js v13.5.7, v14.2.10, and later. We recommend upgrading regardless of whether you can reproduce the issue or not.
Workarounds
There are no official or recommended workarounds for this issue, we recommend that users patch to a safe version.
Credits
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Next.js authorization bypass vulnerability
CVE-2024-51479 / GHSA-7gfc-8cq8-jh5f
More information
Details
Impact
If a Next.js application is performing authorization in middleware based on pathname, it was possible for this authorization to be bypassed.
Patches
This issue was patched in Next.js
14.2.15
and later.If your Next.js application is hosted on Vercel, this vulnerability has been automatically mitigated, regardless of Next.js version.
Workarounds
There are no official workarounds for this vulnerability.
Credits
We'd like to thank tyage (GMO CyberSecurity by IERAE) for responsible disclosure of this issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
vercel/next.js (next)
v14.2.15
Compare Source
Core Changes
Credits
Huge thanks to @ztanner, @agadzik, @huozhi, @styfle, @icyJoseph and @wyattjoh for helping!
v14.2.14
Compare Source
Core Changes
Credits
Huge thanks to @styfle, @ztanner, @ijjk, @huozhi and @wyattjoh for helping!
v14.2.13
Compare Source
v14.2.12
Compare Source
v14.2.11
Compare Source
v14.2.10
Compare Source
v14.2.9
Compare Source
v14.2.8
Compare Source
v14.2.7
Compare Source
v14.2.6
Compare Source
v14.2.5
Compare Source
v14.2.4
Compare Source
Core Changes
Credits
Huge thanks to @ztanner, @ijjk, @wbinnssmith, @huozhi, and @lubieowoce for helping!
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.