Security Advisories (4)
CPANSA-YAML-2019-01 (2019-04-27)

Loading globs is easily exploitable.

CPANSA-YAML-2017-01 (2017-05-10)

YAML loader can run DESTROY method of object created with perl/* tag.

CVE-2017-20285 (2026-10-05)

YAML versions before 1.30 for Perl allow a loaded document to trigger the DESTROY method of arbitrary classes. A perl/hash:Class tag blesses a hash into the class it names. The document supplies the object's fields, and Perl calls DESTROY when it goes out of scope. What DESTROY does depends on the classes the process has loaded. With File::Temp::Dir from core Perl, it can delete a directory tree the document names.

CVE-2019-25777 (2026-10-05)

YAML versions before 1.27_001 for Perl allow a loaded perl/glob document to replace any package variable, which can lead to arbitrary code execution. A perl/glob document names a package and a symbol, and supplies the value assigned to it. Nothing restricts the name, so the target can be @INC or YAML's own load options. A perl/glob document that sets $YAML::LoadCode or $YAML::UseCode turns on code loading, which is off by default, for every later Load() in the process. A perl/code document is then passed to a string eval, so an attacker who supplies two documents to separate Load() calls in one process can execute arbitrary Perl code.

Modules

Testing Module for YAML Implementations
YAML Ain't Markup Language (tm)
Pick a YAML implementation and use it.
Base class for YAML classes
YAML class for dumping Perl objects to YAML
Base class for YAML Dumper classes
Error formatting class for YAML modules
YAML class for loading Perl objects to YAML
Base class for YAML Loader classes
YAML marshalling class you can mixin to your classes
A generic data node that encapsulates YAML information
Tag URI object class for YAML
Marshall Perl internal data types to/from YAML

Provides

in lib/Test/YAML.pm
in lib/YAML/Types.pm
in lib/YAML/Types.pm
in lib/YAML/Types.pm
in lib/YAML/Types.pm
in lib/YAML/Types.pm
in lib/YAML/Types.pm
in lib/YAML/Error.pm
in lib/YAML/Node.pm
in lib/YAML/Node.pm
in lib/YAML/Node.pm