-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
FileTypeValidator naive file type checking (@nestjs/common vulnerability) #14876
Comments
same issue. |
From the documentation and source code, it seems that However, since this naive strategy can easily be bypassed (as Snyk pointed out), I was wondering:
Of course, this would require an external library like If the core team feels this could be aligned with NestJS philosophy, I’d be happy to prepare a PR that keeps the default behavior as-is, but provides an optional secure validator for stricter use cases. |
I guess we should either:
Thoughts? If we go with removal, we'd need to deprecate it first, which would prolong the process. That said, I'm leaning toward option 2—for now. |
I also like to go forward with option 2 and would like to have it quick 😄 |
@kamilmysliwiec @mag123c I filed a PR to introduce |
Could you make a fix for nestjs v10? |
Just FYI, this is not an issue.
There's really no need for any immediate fixes/patches/backfixes. |
But the problem is that |
This is something that should be reported to Snyk, not us, though. The validator and the pipe work as described (in the documentation, in the comment block, and even the PR itself). |
Is there an existing issue for this?
Current behavior
Snyk is reporting a vulnerability with @nestjs/common reported at this URL: Snyk Report
According to reports, there is no version that prevents this vulnerability. Is there any way you can help me?
Minimum reproduction code
https://codesandbox.io/p/sandbox/github/nestjs/typescript-starter
Steps to reproduce
Expected behavior
Remove the vulnerability reported by Snyk
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
11.0.12
Packages versions
Node.js version
22.14.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: