Fix for 4 vulnerabilities

Addressed four security vulnerabilities to improve system protection.