List of Common Vulnerabilities

The following is the list of the most common Vulnerabilities:

  • Cross-Site Scripting (XSS): The XSS is a vulnerability that allows attackers to inject malicious scripts into the web applications which are then executed by other users.
  • Cross-Site Request Forgery (CSRF): The CSRF is an attack where an attacker tricks a user into performing actions on a different site without their knowledge or consent.
  • Input Validation and Sanitization: This involves validating and cleaning user inputs to prevent the execution of malicious code or unexpected behavior.
  • SQL Injection: The Attackers manipulate input to execute malicious SQL queries on a database.
  • Insecure Deserialization: The Attackers exploit weaknesses in the deserialization to execute malicious code.
  • Authentication and Session Management Issues: The Weaknesses in authentication and session management can lead to unauthorized access.

How to prevent the Common Vulnerabilities in JavaScript ?

In this article, we will see the Preventing Common Vulnerabilities in JavaScript. Before we proceed, we will first understand the list of most common Vulnerability attacks, & then will understand the various approaches to resolve those Vulnerability attacks. Finally, we will understand the concept with the help of basic illustrations.

Table of Content

  • List of Common Vulnerabilities
  • List of Preventive Approaches
  • Cross-Site Scripting (XSS) Prevention
  • Cross-Site Request Forgery (CSRF)
  • Input Validation and Sanitization
  • Conclusion

Similar Reads

List of Common Vulnerabilities

The following is the list of the most common Vulnerabilities:...

List of Preventive Approaches

Cross-Site Scripting (XSS) Prevention Cross-Site Request Forgery (CSRF) Input Validation and Sanitization...

Cross-Site Scripting (XSS) Prevention

The XSS occurs when an attacker injects malicious scripts into a web application which are then executed in a user’s browser. This can lead to stealing sensitive data or compromising user sessions. The preventive approach is to Sanitize user inputs and escape output using the appropriate encoding functions. A detailed description of prevention is covered in Cross Site Scripting (XSS) Prevention Techniques article....

Cross-Site Request Forgery (CSRF)

...

Input Validation and Sanitization

The CSRF involves tricking a user into performing unwanted actions without their consent and This happens when an attacker uses a user’s authenticated session to perform the actions on a different site. The preventive approach is to implement CSRF tokens in forms to validate the authenticity of the requests. Use SameSite cookies to restrict cookies from being sent in the cross-origin requests. Please refer to the Cross-Site Request Forgery (CSRF) Protection Methods and Bypasses Article for a detailed description....

Conclusion

...