-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Prototype pollution in LoadActionModules() CVE-2021-44908 #7209
Comments
@Marynk Thanks for posting! We'll take a look as soon as possible. In the mean time, there are a few ways you can help speed things along:
Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly. For help with questions about Sails, click here. |
Hi @Marynk, thanks for reading through the code! I took a look at your .zip file and video. Here is the provided code that demonstrates how it is possible for a developer to code a Sails.js request handler that creates a javascript string, compiling in untrusted, unescaped data from the request, then deliberately overwrites an action file in the
The userland app code then calls We've updated the docs to clarify this, just in case, and linked to this issue. Thanks! |
@Marynk nice to see security given consideration! Could you unzip the contents of your zip file into your repository https://github.com/Marynk/JavaScript-vulnerability-detection/blob/main/sailsJS_PoC/sailsJS%20PoC.zip? Your readme says there is screen capture video and commentary, which I don't see. I can only assume it is in the zip. It doesn't make sense to compress already compressed video and I don't trust your account enough to be downloading unkown executable/zip files. |
Node version: 12.13.0
Sails version (sails): 1.4.0
else-if statement in lines 134-165 https://github.com/balderdashy/sails/blob/master/lib/app/private/controller/load-action-modules.js#L163) is vulnerable to prototype pollution.
The object assignment on line 163 may lead to denial of service or property injection if SailsJS based application dynamically controls the value of variable “filePath”.
Proof of concept case is demonstrated here: https://github.com/Marynk/JavaScript-vulnerability-detection/tree/main/sailsJS_PoC
The CVE Program has assigned the ID CVE-2021-44908 to this issue. This is a record on the CVE List, which standardizes names for security problems.
The text was updated successfully, but these errors were encountered: