CanonicalSecurity
Path traversal (CWE-22): a filename from the request can read/write files outside the intended folder
Joining a request-supplied filename straight into a file path lets "../../etc/passwd"-style input escape the intended directory. Reject path separators and ".." in the input, or resolve the final path and check it stays under the intended base directory.
securitypath-traversalcwe-22