-
Notifications
You must be signed in to change notification settings - Fork 213
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
Potential bug: Busboy crashes with unescaped quotes in field names/filenames (or: Unexpected strictness in quote handling) #370
Comments
Is this what you're referring to when you're saying crashes are being triggered? If so, it's because you have buggy logic in your error handler where you're trying to write response headers multiple times. That error is coming from node core and has nothing to do with |
My apologies. I completely agree with everything you've said here and I'm not trying to suggest that there's anything fundamentally wrong with busboy here, and I fully appreciate the issue may be badly phrased. Essentially, you can boil down why I reported this like so:
If you don't deem it to be an issue that's completely fine and I apologise again for the hassle if not! |
Hi folks,
It appears that busboy is able to trigger application crashes when encountering unescaped quotes within field names or filenames. This behavior has been observed in multiple applications and endpoints, leading to full application crashes which could cause denial of service and unexpected behavior.
It's important to note that the crash only occurs if the consuming application does not have proper error handling to catch unhandled exceptions or errors emitted by Busboy. If the application has robust error handling, it can potentially catch these errors and prevent the process from crashing. However, the underlying issue of Busboy encountering parsing errors due to unescaped quotes remains, even if the application doesn't crash.
I was also able to get this to crash applications which consume busboy via other libraries (specifically
multer
)Minimal Reproduction:
node x.js
Results
This should, in theory, crash the app with the following error:
Caveat
I'm not sure if this is intended behaviour but I thought it was worth reporting on the unlikely off chance this hasn't been investigated previously. If it IS intended behaviour, the error messages could perhaps be a little more descriptive than they are.
The text was updated successfully, but these errors were encountered: