fix: remove unsafe pickle deserialization in txt_to_obj (CVE CWE-502)#677
Merged
dushyantbehl merged 1 commit intoJul 21, 2026
Conversation
YashasviChaurasia
requested review from
aluu317,
anhuong,
dushyantbehl,
fabianlim and
kmehant
as code owners
July 20, 2026 06:59
|
Thanks for making a pull request! 😃 |
YashasviChaurasia
force-pushed
the
fix/remove-pickle-deserialization
branch
3 times, most recently
from
July 20, 2026 08:37
1173cd3 to
51470f9
Compare
dushyantbehl
requested changes
Jul 20, 2026
dushyantbehl
left a comment
Collaborator
There was a problem hiding this comment.
@YashasviChaurasia do we know why some tests are failing here?
if its only mlflow tests then can you disable them in the workflow as part of the PR.
dushyantbehl
approved these changes
Jul 20, 2026
dushyantbehl
left a comment
Collaborator
There was a problem hiding this comment.
LGTM apart from minor request
Signed-off-by: yashasvi <yashasvi@ibm.com>
YashasviChaurasia
force-pushed
the
fix/remove-pickle-deserialization
branch
from
July 20, 2026 20:06
51470f9 to
877c69c
Compare
Collaborator
|
@YashasviChaurasia I have merged this PR...please see if any test case run needs fixing. We can merge it separately. |
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.
Description of the change
Remove the
pickle.loadsfallback intxt_to_obj()which allowed arbitrary code execution via crafted base64 payloads in theSFT_TRAINER_CONFIG_JSON_ENV_VARenvironment variable (CWE-502). The function now only accepts JSON. The correspondingserialize_args()inbuild/utils.pyis updated to usejson.dumpsinstead ofpickle.dumps.Related issue number
Closes CVE report: Deserialization of Untrusted Data (CWE-502, CVSS 9.9 Critical)
How to verify the PR
pickleis no longer imported or used intuning/utils/config_utils.pyorbuild/utils.pyPYTHONPATH=. pytest tests/utils/test_config_utils.py::test_get_json_config_can_load_from_envvar -vjson.JSONDecodeErrorinstead of executingWas the PR tested