Don’t recurse on untrusted input
Trail of Bits researchers found that a single malicious request can crash web applications that use recursive functions to process untrusted input, and used a CodeQL query to identify denial-of-service vulnerabilities in several high-profile Java projects....