Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure it's true that parsing an untrusted YAML document is generally unsafe. That has to be a property of the parser, not the format.

As TFA says:

> In Python, you can avoid this pitfall by using yaml.safe_load instead of yaml.load

In Ruby, there are now analogous options (including - of course lol - a gem which monkeypatches the YAML module to make it safe by default) [1]:

> Use the safe-yaml gem which overrides YAML.load

> Require a newer version of Psych that provides a safe-load option

In Java, SnakeYaml has a document about security which i think is a long way of admitting that it's not secure [2]. It looks like eo-yaml just doesn't support tags at all.

[1] https://trailofbits.github.io/rubysec/yaml/index.html

[2] https://bitbucket.org/snakeyaml/snakeyaml/wiki/CVE%20&%20NIS...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: