Skip to content
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

[Security] Use yaml.SafeLoader instead of yaml.Loader/yaml.FullLoader (same as yaml.UnsafeLoader) #101

Closed
kamadorueda opened this issue Sep 12, 2020 · 4 comments

Comments

@kamadorueda
Copy link

kamadorueda commented Sep 12, 2020

here: https://github.com/awslabs/aws-cfn-template-flip/blob/master/cfn_tools/yaml_loader.py#L20

image

as explained here:

https://pyyaml.org/wiki/PyYAMLDocumentation#LoadingYAML

image

an in the source-code comment:

image

is insecure, we should use SafeLoader instead

@koiker
Copy link
Collaborator

koiker commented Sep 12, 2020

I have updated the Loader to FullLoader in the fix/max-col-width. Are you using Python 2.7 or 3.x?
The new version will deprecate python 2.7 and will only work with python 3.x

@kamadorueda
Copy link
Author

That's awesome!

@kamadorueda
Copy link
Author

Seems like FullLoader is also vulnerable: yaml/pyyaml#420

I've updated the issue

@kamadorueda kamadorueda changed the title [Security] Use yaml.FullLoader instead of yaml.Loader (same as yaml.UnsafeLoader) [Security] Use yaml.SafeLoader instead of yaml.Loader/yaml.FullLoader (same as yaml.UnsafeLoader) Sep 13, 2020
@koiker
Copy link
Collaborator

koiker commented Apr 27, 2021

Fixed in #102

@koiker koiker closed this as completed Sep 13, 2021
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

No branches or pull requests

2 participants