Description
This script is vulnerable to arbitrary file deletion.
This issue allows an attacker to influence calls to the 'unlink()' function and delete arbitrary files. Due to a lack of input validation, an attacker can supply directory traversal sequences followed by an arbitrary file name to delete specific files.
Remediation
Your script should filter metacharacters from user input.
References
Related Vulnerabilities
Plone CMS Improper Input Validation Vulnerability (CVE-2013-4197)
MediaWiki Improper Input Validation Vulnerability (CVE-2020-35477)
Ruby on Rails Improper Input Validation Vulnerability (CVE-2016-2098)
Ruby on Rails Improper Input Validation Vulnerability (CVE-2011-2929)
Microsoft SQL Server Improper Input Validation Vulnerability (CVE-2001-0509)