[GHSA-f2m9-wcf4-cwwx] MLFlow Creates a Temporary File With Insecure Permissions - #8839
Open
Chi-Song-Owen wants to merge 1 commit into
Open
Conversation
github-actions
Bot
changed the base branch from
main
to
Chi-Song-Owen/advisory-improvement-8839
July 28, 2026 08:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
Comments
Summary
Add
bd8854fb2b4b168a4384ebddc6c4a0b5d56aff01as thevulnerability-introducing commit for GHSA-f2m9-wcf4-cwwx.
Although the commit title is "Fix temp directory permission issue on
worker side", it fixes a Spark worker accessibility issue rather than
a security vulnerability. In doing so, it introduces the insecure
permissions described by this advisory.
Evidence
Before this commit,
tempfile.mkdtemp()created the relevant temporarydirectories with its secure default permission mode of
0o700.The commit explicitly added
os.chmod(..., 0o777)in the followingrelevant locations:
mlflow/utils/file_utils.py:get_or_create_nfs_tmp_dir()mlflow/pyfunc/__init__.py:_create_model_downloading_tmp_dir()These are the same two temporary-directory creation paths identified in
GHSA-f2m9-wcf4-cwwx. Changing their permissions from
0o700to0o777made the directories writable by non-owner users, enabling local users
to tamper with downloaded model artifacts.
The relationship is also confirmed by the remediation history:
1d7c8d4cf0a67d407499a8a4ffac387ea4f8194a, associated withCVE-2025-10279 / GHSA-4x5p-f36r-mxxr, changed only
get_or_create_tmp_dir()from0o777to0o750, leaving the NFS andmodel-downloading paths insufficiently protected.
1dcbb0c2fbd1f446c328830e601ca13a28219b8a, finally changedget_or_create_nfs_tmp_dir()from0o777to0o750and_create_model_downloading_tmp_dir()from0o770to0o750.Therefore,
bd8854fb2b4b168a4384ebddc6c4a0b5d56aff01is the source-levelcommit that originally introduced the insecure permission changes
underlying this advisory.