Haxoris Wiki

A05: Injection

Injection occurs when an attacker is able to insert malicious input into an application, causing it to execute unintended commands or queries. This vulnerability arises when user input is improperly handled, allowing attackers to manipulate databases, operating systems, or other backend services. Injection attacks can lead to data breaches, unauthorized access, remote code execution (RCE), and full system compromise. In the OWASP Top 10:2025 this category also covers Cross-Site Scripting (XSS), which remains one of the most reported weaknesses in the entire dataset.

Common Vulnerabilities:

  • SQL Injection (SQLi) – Manipulating database queries
  • Command Injection – Executing system commands
  • Cross-Site Scripting (XSS) – Injecting malicious scripts in web pages
  • Code Injection – Evaluating attacker-controlled code server-side
  • LDAP Injection – Manipulating directory service queries
  • NoSQL and ORM Injection – Exploiting document stores and query builders
  • Expression Language and Template Injection – Abusing server-side template engines
  • Email Header and HTTP Response Header Injection

To mitigate these risks, applications should use parameterized queries (prepared statements), validate and sanitize user input, escape output according to its rendering context, enforce content security policies (CSP), and implement least privilege access for backend services. Regular security testing, including automated scans and manual penetration testing, is essential to detect and prevent injection vulnerabilities.

Note: XML External Entity (XXE) processing was historically discussed alongside injection. OWASP maps it to A02: Security Misconfiguration, where you will find it in this wiki.

In this section

Last updated

References