goldbergyoni / nodebestpractices

:white_check_mark: The Node.js best practices list (July 2024)
https://twitter.com/nodepractices/
Creative Commons Attribution Share Alike 4.0 International
97.39k stars 9.89k forks source link

Security: Prevent SSRF attacks #292

Open js-kyle opened 5 years ago

js-kyle commented 5 years ago

SSRF (Server Side Request Forgery) vulnerability allows an attacker to change a parameter used on the Node.js application to create or control requests from the vulnerable server.

This introduces attack vectors such as

The example could show the use of a whitelist of allowed domains and protocols from where the Node.js can fetch remote resources (and mention to avoid the use of user provided url's unless really required)

REALSTEVEIG commented 2 years ago

Yes its really lacking in that sense.