Explanation A web application firewall (WAF) is a security solution that monitors and filters the traffic between a web application and the internet. It can prevent code injection attacks by blocking malicious requests that contain code snippets or commands that could compromise the web application. A WAF can also enforce input validation rules and sanitize user inputs to prevent code injection. References: CompTIA Security+ SY0-601 Certification Study Guide, Chapter 4: Implementing Secure Network Designs, page 194; 5 ways to prevent code injection in JavaScript and Node.js