Skip to content

fix(security): replace yaml.load(FullLoader) with yaml.safe_load#619

Open
hobostay wants to merge 1 commit into
OpenBMB:mainfrom
hobostay:fix/insecure-yaml-loading
Open

fix(security): replace yaml.load(FullLoader) with yaml.safe_load#619
hobostay wants to merge 1 commit into
OpenBMB:mainfrom
hobostay:fix/insecure-yaml-loading

Conversation

@hobostay
Copy link
Copy Markdown

Summary

  • Replace yaml.load(f, Loader=yaml.FullLoader) with yaml.safe_load(f) in utils/io_utils.py and entity/config_loader.py
  • The rest of the codebase already uses yaml.safe_load (e.g. server/services/workflow_storage.py, entity/configs/node/skills.py, runtime/node/agent/skills/manager.py)
  • These two files are the only remaining ones using the less safe FullLoader

Vulnerability Details

yaml.FullLoader still supports certain Python object tags (like !!python/object), which can be exploited for arbitrary code execution when loading YAML from untrusted sources. yaml.safe_load restricts loading to standard YAML tags only, which is the recommended safe default.

The other YAML loading sites in this codebase already use yaml.safe_load. These two were overlooked.

Files Changed

  • utils/io_utils.py:6yaml.load(f, Loader=yaml.FullLoader)yaml.safe_load(f)
  • entity/config_loader.py:30yaml.load(handle, Loader=yaml.FullLoader)yaml.safe_load(handle)

Test plan

  • Run existing tests to verify YAML loading still works correctly
  • Verify workflow configs can still be loaded and parsed

🤖 Generated with Claude Code

yaml.load with FullLoader can still instantiate arbitrary Python
objects through YAML tags like !!python/object, which enables
remote code execution when loading untrusted YAML files.
yaml.safe_load only supports standard YAML tags and is safe.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant