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

- Severity: Critical 9.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 29% of CVEs (2026-12-01)
- Published: 2026-10-05T06:49:17.583Z
- Modified: 2026-10-06T17:17:08.657Z
- Weaknesses: CWE-470, CWE-502
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: CPANSec

## 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.

(As written by CVE List.)

## Affected

- YAML: before 1.30

## References

- <https://github.com/ingydotnet/yaml-pm/issues/176> (issue-tracking)
- <https://github.com/ingydotnet/yaml-pm/commit/471314bbdcbd62077eea32755929122aa8bd00a3.patch> (patch)
- <https://github.com/ingydotnet/yaml-pm/commit/7736f38bd02e4f9f77d5468721e3be3d7b34a8ec.patch> (patch)
- <https://metacpan.org/release/TINITA/YAML-1.30/changes> (release-notes)
- <http://www.openwall.com/lists/oss-security/2026/10/05/8>

## Sources

- CVE List: [CVE-2017-20285](https://www.cve.org/CVERecord?id=CVE-2017-20285), CVE Terms of Use, modified 2026-10-06
- NVD: [CVE-2017-20285](https://nvd.nist.gov/vuln/detail/CVE-2017-20285), Public domain, modified 2026-10-06

---

Page: https://cve.day/CVE-2017-20285 · Whole record: https://cve.day/CVE-2017-20285.json · Rebuilt by cve.day 2026-11-25T22:57:36.310Z
