The vulnerability stems from two key issues in the file server implementation:
In find_file: Path validation checks (absolute path and '../' detection) were performed before URL unescaping, allowing attackers to bypass these checks using encoded paths (e.g., '|..%5c..%5cetc/passwd'). The commit moved these checks after URL processing.
In serve_file: No validation ensured the resolved file path was actually contained within the configured file_roots directories. The patch added salt.utils.verify.clean_path checks to enforce this containment.
The test cases added in the commit (test_find_file_not_in_root and test_serve_file_not_in_root) directly validate these fixes, confirming the original vulnerable behavior.