Note that snakeyaml isn't designed to operate on YAML data coming from untrusted sources, in such cases you need to apply sanitising/exception handling yourself. Please see https://bitbucket.org/snakeyaml/snakeyaml/wiki/CVE%20&%20NIST.md for additional information.