Use 'werkzeug.security.safe_join()' instead of plain 'os.path.join()' to sanitize user-provided filename variable and avoid escaping the base directory.
Vulnerability discovered by Thomas Chauchefoin thomas@chauchefoin.fr
Fixes: rhbz#2279411, rhbz#2280728, rhbz#2280726, CVE-2024-4982
Signed-off-by: Dominik Wombacher dominik@wombacher.cc
Metadata Update from @wombelix: - Request assigned
Patch reviewed and validated in Bugzilla. Tests performed locally, all passed.
rebased onto 9e1a5c49cfbc730fd361d87eeb6be74fca6cf6a7
Pull-Request has been merged by wombelix
Use 'werkzeug.security.safe_join()' instead of plain 'os.path.join()'
to sanitize user-provided filename variable and avoid escaping the base directory.
Vulnerability discovered by Thomas Chauchefoin thomas@chauchefoin.fr
Fixes: rhbz#2279411, rhbz#2280728, rhbz#2280726, CVE-2024-4982
Signed-off-by: Dominik Wombacher dominik@wombacher.cc