Fix Projector Plugin vulnerability#7115
Draft
psamanoelton wants to merge 2 commits into
Draft
Conversation
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.
Summary
Fixes an arbitrary file read issue in the TensorBoard Projector plugin by restricting asset paths to the directory that contains
projector_config.pbtxt.Previously, user-controlled fields such as
metadata_path,tensor_path,bookmarks_path, andsprite.image_pathcould resolve to absolute paths or traversal paths outside the intended logdir/config directory. That allowed a malicious config to make TensorBoard read and return arbitrary local files from the host.What Changed
projector_config.pbtxt400response when a requested asset path is invalidSecurity Impact
This closes a path traversal / arbitrary local file read vector in the Projector plugin for deployments where an attacker can write or influence
projector_config.pbtxtcontents under a scanned logdir.Tests
Added projector integration coverage for:
metadata_pathusing traversal outside the logdirtensor_pathusing an absolute path outside the logdirbookmarks_pathusing an absolute path outside the logdirsprite.image_pathusing traversal outside the logdirValidation
Verified:
python -m py_compile tensorboard/plugins/projector/projector_plugin.py tensorboard/plugins/projector/projector_plugin_test.pybazel test //tensorboard/plugins/projector:projector_plugin_testRisk / Compatibility
Low risk for valid configurations.
This change may reject projector configs that previously referenced assets outside the config directory, but that behavior is now considered unsafe and is intentionally blocked.