Remediation Steps
Follow the steps below to remediate this finding on Joomla.
Use JPath::clean() to normalise paths and JPath::check() to validate that the resolved path is within the allowed base directory:
JPath::check($filePath);
Never pass raw user input to JFile::read() or PHP file functions.
Validate uploaded file types using JFile::getExt() and an allowlist.