Description
Flask-AppBuilder before 5.3.1 contains a path traversal vulnerability in ImageManager.save_file that allows authenticated users to write image files outside IMG_UPLOAD_FOLDER via unsanitized multipart filenames. Attackers with add or edit permission on a ModelView with an ImageColumn can upload filenames containing ../ segments to create or overwrite image files like static assets.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
dpgaspar Flask-AppBuilder
Default version status: unaffected
0 to < 5.3.1affected
pkg:pypi/flask-appbuilderReferences
- https://github.com/dpgaspar/Flask-AppBuilder/pull/2495 ↗
- https://github.com/dpgaspar/Flask-AppBuilder/commit/44f3522df563dd8af35c87fcafd59fa2e53b4f90 ↗
- https://github.com/dpgaspar/Flask-AppBuilder/releases/tag/v5.3.1 ↗
- https://github.com/dpgaspar/Flask-AppBuilder/blob/v5.3.0/flask_appbuilder/filemanager.py#L151-L182 ↗
- https://github.com/dpgaspar/Flask-AppBuilder/blob/v5.3.0/flask_appbuilder/filemanager.py#L227-L228 ↗
- https://github.com/dpgaspar/Flask-AppBuilder ↗
- https://www.vulncheck.com/advisories/flask-appbuilder-before-5.3.1-path-traversal-via-imagemanager-save-file-upload-filename ↗