-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FullLoader is not much safer than UnsafeLoader #321
Comments
@jamespic Thanks for the info. We'll address this in the next release. |
It certainly seems to fix the examples I've given. I notice that |
thanks! |
I'll reopen the issue though, as long as the PR is not merged. |
Yeah, having a poke around, it looks like for most classes, |
We released 5.2: https://pypi.org/project/PyYAML/5.2/ |
I'm closing this now, thanks! |
I believe the exploitable code would have to be in For most of the objects used in the exploit examples above, creating an object with |
In newer PyYAML versions the default FullLoader has python/object/* integration removed. One has to use UnsafeLoader instead. see this issue for details: yaml/pyyaml#321
The documentation on
yaml.load
deprecation suggests that usingFullLoader
is safer than usingUnsafeLoader
. Whilst it's true thatFullLoader
is not vulnerable to the YAML given on that page, there are other payloads that trigger remote code execution or other problematic behaviour using only standard library modules:Either the documentation should be made clearer about the relative safety of
FullLoader
, orFullLoader
should be tightened to prevent these cases.You can summarise which types are available for use in exploits with the following snippet:
The text was updated successfully, but these errors were encountered: