Academic coaching, editing, and research guidance for university students.

answered: ANSWER QUESTION Discuss how to secure Node.js applications.

3 min read
  

ANSWER QUESTION
Discuss how to secure Node.js applications.
RESPOND TO ALEXANDER
Node.js is an open-source development platform that can execute JavaScript code on the server side. This application is a very popular application run by companies and personnel, which they use it for web development and other application development. Since this program is so vastly run within many companies it can lead to several security risks within the program or company itself.
Mind inventory states that the top Node.js security risks are “XSS Attacks, Data Leaks, Deserialization, and several other risk.” XSS attacks or Cross-site Scripting allows for hackers to inject vulnerable client-side scripts into webpages views by various users. In order to secure this the company can ensure they are validating the user input, such as utilizing “output encoding methods or tools like the Jade engine with in-built encoding frameworks.” (Savonin, 2020) or opting for, XSS-filters. When it comes to Data Leaks, you can easily send all information for a single object to the frontend of the computer and filter what is displayed, but you do not see what is happening on the backend. An easy fix for this would be to only send information that is needed, nothing proprietary and nothing credential. Lastly you have Deserialization, “a vulnerability that includes deserialization and application of buggy objects through remote code implementation or API calls. This kind of attack is known as CSRF (Cross-site Request Forgery) attack. This attack forces end-users to implement unwanted actions on valid web apps.” (Patel, 2021) To mitigate this a user can manually test app modules that need certain permissions, they can also add access control rules on the server-side to reduce the chance of manipulating access permissions.
RESPOND TO BRAD
Hello class, I hope everyone has had a good week. We are at that halfway point this week!
The topic this week is how to secure a Node.js application. Here is a little background on Node.js was built in 2009, it is only 13 years old, which is fairly new in the tech field. Node.js is based on JavaScript, which will mean developers are able to use the same syntax for both client and server side.
Often times you will get webpages that run on HTTP, which is not so secure (HTTPS). These websites are not the safest for the client. For example, you would not want credit cards, social security numbers, or addresses or any other personal information going through these webpages. You want to make sure it is a HTTPS enabled webpage. By default Node.js sends content over HTTP, which is not safe as stated above. But however, it is possible if you use the HTTPS module, you can force the communication to be done over a secure channel with the client.
-Brad

Academic integrity note

Use this educational resource to build your understanding. Follow your institution’s rules and cite sources appropriately.

Want feedback on your own work?

Request Academic Support

Leave a Reply

Your email address will not be published. Required fields are marked *