CVE-2017-20285: YAML versions before 1.30 for Perl allow a loaded document to trigger the DESTROY method of arbitrary classes

Published Oct 5, 2026
·
Updated

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.

Affected Software

1 affected component
Perl YAML<1.30

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade YAML for Perl to a version that resolves this vulnerability.

    Fixed in 1.30

Event History

Oct 5, 2026
CVE Published
via MITRE·06:49 AM
Data Sourced
via MITRE·06:49 AM
RemedyDescriptionWeakness
Data Sourced
via NVD·07:16 AM
DescriptionWeakness

Frequently Asked Questions

1

What conditions are required for exploitation?

An attacker must be able to cause the application to load a YAML document. The process must also have a class loaded whose DESTROY method produces a harmful effect when invoked with attacker-supplied object fields.

2

What is a concrete impact example?

If File::Temp::Dir from core Perl is loaded, a crafted perl/hash:Class tag can create an object whose destruction deletes the directory tree named in the YAML document.

3

How can I tell whether an application is exposed to the documented impact?

Check whether it uses a YAML version before 1.30 and loads YAML from an attacker-influenced source. Also identify classes loaded in the process that implement DESTROY, particularly File::Temp::Dir.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203