Node.Security

Security Audit of Sails

ISGroup SRL performed an automated Code Review (not a real Static Analysis, more a grep-on-steroid) of this NodeJS project in order to identify potential security vulnerabilities. We do not guarantee that all the findings are valid, and for sure there are plenty of false-positives and false-negatives (undetected issues) but it's free and your project could benefit from this security analisys. The following data is also available in JSON format!

Possible Security Issues
Issue Description Line File
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 35 test/integration/lift.lower.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 36 test/integration/lift.lower.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 7 test/integration/www.test.js
Remote OS Command Execution User controlled data in 'child_process.exec()' can result in Remote OS Command Execution. 8 test/integration/www.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 36 test/integration/hooks.user.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 54 test/integration/hooks.user.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 91 test/integration/hooks.user.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 116 test/integration/hooks.user.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 140 test/integration/hooks.user.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 5 test/integration/middleware.sails.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 7 test/integration/lift.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 69 test/integration/hook.pubsub.modelEvents.context.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 98 test/integration/hook.pubsub.modelEvents.context.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 111 test/integration/hook.pubsub.modelEvents.context.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 144 test/integration/hook.pubsub.modelEvents.context.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 173 test/integration/hook.pubsub.modelEvents.context.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 204 test/integration/hook.pubsub.modelEvents.context.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 234 test/integration/hook.pubsub.modelEvents.context.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 34 test/integration/router.params.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 39 test/integration/router.params.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 103 test/integration/router.blueprintOptions.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 2 test/integration/middleware.compression.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 34 test/integration/router.specifiedRoutes.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 39 test/integration/router.specifiedRoutes.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 45 test/integration/router.viewRendering.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 51 test/integration/router.viewRendering.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 6 test/integration/middleware.static.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 10 test/integration/middleware.static.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 44 test/integration/hook.views.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 50 test/integration/hook.views.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 91 test/integration/hook.views.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 97 test/integration/hook.views.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 42 test/integration/router.defaultController.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 48 test/integration/router.defaultController.test.js
Remote OS Command Execution User controlled data in 'child_process.exec()' can result in Remote OS Command Execution. 7 test/integration/new.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 3 test/integration/lift.https.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 31 test/integration/lift.https.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 70 test/integration/lift.https.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 319 test/integration/hook.pubsub.modelEvents.subscribers.test.js
Remote OS Command Execution User controlled data in 'child_process.exec()' can result in Remote OS Command Execution. 5 test/integration/generate.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 53 test/integration/hook.pubsub.modelEvents.noSubscribers.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 74 test/integration/hook.pubsub.modelEvents.noSubscribers.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 87 test/integration/hook.pubsub.modelEvents.noSubscribers.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 101 test/integration/hook.pubsub.modelEvents.noSubscribers.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 112 test/integration/hook.pubsub.modelEvents.noSubscribers.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 123 test/integration/hook.pubsub.modelEvents.noSubscribers.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 38 test/integration/hook.cors_csrf.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 81 test/integration/hook.blueprints.blacklist.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 2 test/integration/middleware.session.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 2 test/integration/middleware.favicon.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 6 test/integration/middleware.favicon.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 55 test/integration/globals.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 6 test/integration/middleware.cookieParser.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 36 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 54 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 91 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 116 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 140 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 165 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 191 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 226 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 252 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 271 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 309 test/integration/hook.3rdparty.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 40 test/integration/router.APIScaffold.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 46 test/integration/router.APIScaffold.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 423 test/integration/router.APIScaffold.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 432 test/integration/router.APIScaffold.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 1 test/integration/helpers/httpHelper.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 523 test/integration/helpers/sails.io.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 1101 test/integration/helpers/sails.io.js
Remote OS Command Execution User controlled data in 'child_process.exec()' can result in Remote OS Command Execution. 7 test/integration/helpers/appHelper.js
Remote OS Command Execution User controlled data in 'child_process.exec()' can result in Remote OS Command Execution. 81 test/integration/helpers/appHelper.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 523 test/helpers/sails.io.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 1101 test/helpers/sails.io.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 10 test/helpers/test-spawning-sails-lift-child-process-in-cwd.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 98 test/helpers/test-spawning-sails-lift-child-process-in-cwd.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 109 test/helpers/test-spawning-sails-lift-child-process-in-cwd.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 175 test/helpers/sails.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 48 test/unit/App.prototype.load.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 9 test/hooks/http/initialize.test.js
SSRF - Server Side Request Forgery User controlled data in 'request()'' can result in Server Side Request Forgery (SSRF). 8 test/hooks/views/skipAssets.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 120 test/hooks/pubsub/publishCreate.test.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 129 test/hooks/pubsub/publishAdd.test.js
Remote OS Command Execution User controlled data in 'child_process.exec()' can result in Remote OS Command Execution. 8 lib/preinstall_npmcheck.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 90 lib/app/lower.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 142 lib/app/lower.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 80 lib/app/private/loadHooks.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 34 lib/app/private/bootstrap.js
Server Side Injection(SSI) - setTimeout() User controlled data in 'setTimeout()' can result in Server Side Injection (SSI) or Remote Code Execution (RCE). 43 lib/hooks/http/start.js
Weak Hash used - MD5 MD5 is a a weak hash which is known to have collision. Use a strong hashing function. 27 lib/hooks/session/generateSecret.js
Missing Security Features
Issue Description
Missing Security Header - X-Frame-Options (XFO) X-Frame-Options (XFO) header provides protection against Clickjacking attacks.
Missing Security Header - Content-Security-Policy (CSP) Content Security Policy (CSP), a mechanism web applications can use to mitigate a broad class of content injection vulnerabilities, such as cross-site scripting (XSS). CSP Header was not found.
Use Strict Strict Mode allows you to place a program, or a function, in a "strict" operating context. This strict context prevents certain actions from being taken and throws more exceptions.
Missing Security Header - Strict-Transport-Security (HSTS) Strict-Transport-Security (HSTS) header enforces secure (HTTP over SSL/TLS) connections to the server.
Missing 'httpOnly' in Cookie JavaScript can access Cookies if they are not marked httpOnly.
Missing Security Header - X-Content-Type-Options X-Content-Type-Options header prevents Internet Explorer and Google Chrome from MIME-sniffing a response away from the declared content-type.
Missing Security Header - X-Download-Options: noopen X-Download-Options header set to noopen prevents IE users from directly opening and executing downloads in your site's context.
Missing Security Header - X-XSS-Protection:1 X-XSS-Protection header set to 1 enables the Cross-site scripting (XSS) filter built into most recent web browsers.
Missing Security Header - Public-Key-Pins (HPKP) Public-Key-Pins (HPKP) ensures that certificate is Pinned.
Outdated Libraries
File Library Reference