Skip to content

fix: replace yaml.FullLoader with yaml.safe_load (CVE-915) - #52

Open
Jah-yee wants to merge 1 commit into
wallento:masterfrom
Jah-yee:master
Open

fix: replace yaml.FullLoader with yaml.safe_load (CVE-915)#52
Jah-yee wants to merge 1 commit into
wallento:masterfrom
Jah-yee:master

Conversation

@Jah-yee

@Jah-yee Jah-yee commented Jul 19, 2026

Copy link
Copy Markdown

Summary

Replace yaml.load(inputString, Loader=yaml.FullLoader) with yaml.safe_load(inputString) in wavedrom/init.py to fix CWE-915 vulnerability when processing untrusted YAML diagram input.

Security Fix

CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes

  • FullLoader permits YAML constructs beyond JSON-equivalent data (!!python/name, !!python/object)
  • SafeLoader only allows JSON-equivalent types — no functionality lost
  • Fixes vulnerability when processing untrusted YAML diagram input

Changed

Before: yamlCode = yaml.load(inputString, Loader=yaml.FullLoader)
After: yamlCode = yaml.safe_load(inputString)

Testing

Replace yaml.load(inputString, Loader=yaml.FullLoader) with
yaml.safe_load(inputString) to prevent deserialization vulnerabilities
when processing untrusted YAML diagram input.

CWE-915: Improperly Controlled Modification of Dynamically-Determined
Object Attributes. FullLoader permits YAML constructs that go beyond
JSON-equivalent data, creating a wider attack surface.
@Jah-yee

Jah-yee commented Jul 19, 2026

Copy link
Copy Markdown
Author

Thank you for maintaining wavedrompy! This PR replaces yaml.FullLoader with yaml.safe_load to address CWE-915 when processing untrusted diagram input. Happy to make any adjustments based on your feedback.

@Jah-yee

Jah-yee commented Aug 8, 2026

Copy link
Copy Markdown
Author

Friendly ping — any updates? Happy to address feedback.

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