Preface , What you gain to learn , Software developers , Security practitioners , How to read this book? , About the Author , Introduction to Application Security, Application Security Organizations , OWASP , MITRE, CVEs and NVD, Evaluating Open-Source Packages, Application Security Jargon, Test Your Knowledge , Answers , Code Injection , What is Code Injection , Unveiling the Risks , Code Injection Vulnerability in Practice: , Code Injection vs Command Injection, Code Injection in CWE , Test Your Knowledge , Answers , CVE-2022-25760: Code injection in accesslog, About the vulnerability , Exploiting the vulnerability , Lessons Learned, CVE-2021-23390: Code injection in total4, About the vulnerability, Exploiting the vulnerability , About the fix , Lessons Learned, KISS for security, Security by design, Vulnerability applicability, CVE-2020-28502: Code injection in xmlhttprequest, About the vulnerability , Exploiting the vulnerability , Reviewing the fix, Lessons Learned, Weaponizing Code Injection , Code Injection Sinks , Dynamic Code with eval() , Dynamic Code with the Function() Constructor, The Timers Family: setTimeout(), setInterval() & setImmediate() , Module Loading with require() ,Exploiting Path Traversal, Denial of Service, and Code Injection, Module Loading with import() , The vm Module , Debunking the Illusion of Secure JavaScript Sandboxes, Case study: safe-eval ,Case study: safer-eval, Case study: vm2 , Insecurities of Serialization and Deserialization , Case study: serialize-to-js , Exploiting Template Engines, Case study: eta , Worker Threads Are Not a Security Sandbox, Mitigating Code Injection , The Impact of Code Injection Vulnerabilities , Notable Code Injection Vulnerabilities in the Wild , Notable Code Injection Vulnerabilities in Node,js , Mitigating Code Injection Vulnerabilities , Security Controls, Code Injection Security Best Practices , Security Sandbox Environments, The isolated-vm Package , The Endo Project and SES Package, Worker Threads and Child Processes, Appendix , Test Your Knowledge , Answers , CVEs in This Book