-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fix(common): introduce magic file type validator to nestjs common #14948
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
Merged
kamilmysliwiec
merged 50 commits into
nestjs:10.4.15
from
Chathula:fix-nest-common-mime-validator
Apr 14, 2025
Merged
fix(common): introduce magic file type validator to nestjs common #14948
kamilmysliwiec
merged 50 commits into
nestjs:10.4.15
from
Chathula:fix-nest-common-mime-validator
Apr 14, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 tasks
15 tasks
I'm starting to get this error after updating from 10.4.15 to 10.4.17:
|
15 tasks
By no means it was a minor release. |
renatosugimoto
added a commit
to renatosugimoto/ts-nestjs-trainning
that referenced
this pull request
May 21, 2025
 <h3>Snyk has created this PR to upgrade @nestjs/platform-express from 10.4.15 to 10.4.17.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **2 versions** ahead of your current version. - The recommended version was released **25 days ago**. #### Issues fixed by the recommended upgrade: | | Issue | Score | Exploit Maturity | :-------------------------:|:-------------------------|:-------------------------|:-------------------------  | Arbitrary Code Injection<br/>[SNYK-JS-NESTJSCOMMON-9538801](https://snyk.io/vuln/SNYK-JS-NESTJSCOMMON-9538801) | **561** | Proof of Concept <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@nestjs/platform-express</b></summary> <ul> <li> <b>10.4.17</b> - <a href="https://redirect.github.com/nestjs/nest/releases/tag/v10.4.17">2025-04-15</a></br><p>v10.4.17</p> </li> <li> <b>10.4.16</b> - <a href="https://redirect.github.com/nestjs/nest/releases/tag/v10.4.16">2025-04-14</a></br><h2>What's Changed</h2> <ul> <li>fix(common): introduce magic file type validator to nestjs common by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Chathula/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/Chathula">@ Chathula</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2988831051" data-permission-text="Title is private" data-url="nestjs/nest#14948" data-hovercard-type="pull_request" data-hovercard-url="/nestjs/nest/pull/14948/hovercard" href="https://redirect.github.com/nestjs/nest/pull/14948">#14948</a></li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://redirect.github.com/nestjs/nest/compare/v10.4.15...v10.4.16"><tt>v10.4.15...v10.4.16</tt></a></p> </li> <li> <b>10.4.15</b> - 2024-12-09 </li> </ul> from <a href="https://redirect.github.com/nestjs/nest/releases">@nestjs/platform-express GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. > - Max score is 1000. Note that the real score may have changed since the PR was raised. > - Snyk has automatically assigned this pull request, [set who gets assigned](/settings/integration). --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI0NWRhM2MxMi1jYTlmLTQyNWEtODY3MS00N2E2OTY2NTFkMDQiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjQ1ZGEzYzEyLWNhOWYtNDI1YS04NjcxLTQ3YTY5NjY1MWQwNCJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 👩💻 [Set who automatically gets assigned](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr/) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5/settings/integration?pkg=@nestjs/platform-express&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@nestjs/platform-express","from":"10.4.15","to":"10.4.17"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-NESTJSCOMMON-9538801"],"prId":"45da3c12-ca9f-425a-8671-47a696651d04","prPublicId":"45da3c12-ca9f-425a-8671-47a696651d04","packageManager":"npm","priorityScoreList":[561],"projectPublicId":"31d5132a-e6b1-4b8a-a6a3-43b157a71ac5","projectUrl":"https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-NESTJSCOMMON-9538801"],"upgradeInfo":{"versionsDiff":2,"publishedDate":"2025-04-15T16:10:28.275Z"},"vulns":["SNYK-JS-NESTJSCOMMON-9538801"]}' Co-authored-by: snyk-bot <[email protected]>
renatosugimoto
added a commit
to renatosugimoto/ts-nestjs-trainning
that referenced
this pull request
May 21, 2025
 <h3>Snyk has created this PR to upgrade @nestjs/core from 10.4.15 to 10.4.17.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **2 versions** ahead of your current version. - The recommended version was released **25 days ago**. #### Issues fixed by the recommended upgrade: | | Issue | Score | Exploit Maturity | :-------------------------:|:-------------------------|:-------------------------|:-------------------------  | Arbitrary Code Injection<br/>[SNYK-JS-NESTJSCOMMON-9538801](https://snyk.io/vuln/SNYK-JS-NESTJSCOMMON-9538801) | **561** | Proof of Concept <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@nestjs/core</b></summary> <ul> <li> <b>10.4.17</b> - <a href="https://redirect.github.com/nestjs/nest/releases/tag/v10.4.17">2025-04-15</a></br><p>v10.4.17</p> </li> <li> <b>10.4.16</b> - <a href="https://redirect.github.com/nestjs/nest/releases/tag/v10.4.16">2025-04-14</a></br><h2>What's Changed</h2> <ul> <li>fix(common): introduce magic file type validator to nestjs common by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Chathula/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/Chathula">@ Chathula</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2988831051" data-permission-text="Title is private" data-url="nestjs/nest#14948" data-hovercard-type="pull_request" data-hovercard-url="/nestjs/nest/pull/14948/hovercard" href="https://redirect.github.com/nestjs/nest/pull/14948">#14948</a></li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://redirect.github.com/nestjs/nest/compare/v10.4.15...v10.4.16"><tt>v10.4.15...v10.4.16</tt></a></p> </li> <li> <b>10.4.15</b> - 2024-12-09 </li> </ul> from <a href="https://redirect.github.com/nestjs/nest/releases">@nestjs/core GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. > - Max score is 1000. Note that the real score may have changed since the PR was raised. > - Snyk has automatically assigned this pull request, [set who gets assigned](/settings/integration). --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIzMzlmMzU4Mi05MTA1LTRlNmMtODI5ZC03Y2Y3MDhlZjMxZmEiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjMzOWYzNTgyLTkxMDUtNGU2Yy04MjlkLTdjZjcwOGVmMzFmYSJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 👩💻 [Set who automatically gets assigned](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr/) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5/settings/integration?pkg=@nestjs/core&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@nestjs/core","from":"10.4.15","to":"10.4.17"}],"env":"prod","hasFixes":true,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":["SNYK-JS-NESTJSCOMMON-9538801"],"prId":"339f3582-9105-4e6c-829d-7cf708ef31fa","prPublicId":"339f3582-9105-4e6c-829d-7cf708ef31fa","packageManager":"npm","priorityScoreList":[561],"projectPublicId":"31d5132a-e6b1-4b8a-a6a3-43b157a71ac5","projectUrl":"https://app.snyk.io/org/renatosugimoto/project/31d5132a-e6b1-4b8a-a6a3-43b157a71ac5?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["priorityScore"],"type":"auto","upgrade":["SNYK-JS-NESTJSCOMMON-9538801"],"upgradeInfo":{"versionsDiff":2,"publishedDate":"2025-04-15T16:10:28.940Z"},"vulns":["SNYK-JS-NESTJSCOMMON-9538801"]}' Co-authored-by: snyk-bot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FileTypeValidator
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Bugfix
Feature
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Other... Please describe:
security enhancement fix
What is the current behavior?
Issue Number: N/A
What is the new behavior?
addMagicFileTypeValidator
pipe method instead ofaddFileTypeValidator
pipe to more secure mime type validationDoes this PR introduce a breaking change?
Other information