Fix security vulnerabilities