All reports
High

perl-yaml: perl-yaml: Arbitrary destructor method execution via crafted YAML document

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2017-20285

Probability of exploitation in the next 30 days: 0.34%

FIRST EPSS · 2026-11-19

Description

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.

A flaw was found in perl-yaml. An attacker can trigger unintended actions, such as arbitrary file deletion, by supplying a specially crafted YAML document. The parser permits untrusted documents to instantiate arbitrary object classes, causing Perl to automatically execute their destructor methods when the objects are cleaned up.