CPANSA-YAML-2017-20285: YAML vulnerability
| Publisher | giterlizzi | Document category | csaf_security_advisory |
|---|---|---|---|
| Initial release date | 2026-10-05T00:00:00 | Engine | CSAF Perl Toolkit 0.26 |
| Current release date | 2026-10-05T00:00:00 | Build Date | |
| Current version | 1 | Status | final |
| CVSS v3.1 Base Score | 9.1 | Severity | Critical |
| Original language | Language | en | |
| Also referred to | |||
Vulnerability 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.
Vulnerabilities
CVE-2017-20285
Vulnerability DescriptionYAML 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.
| Weakness | CWE-470 : Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') |
|---|
Product status
Known affected
| Product | Score | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| YAML less than 1.30 |
|
Fixed
- YAML greater than or equal 1.30
giterlizzi
Namespace: https://github.com/giterlizzi/
gdt@cpan.org
References
- CPANSA-YAML-2017-20285 JSON self
https://raw.githubusercontent.com/giterlizzi/perl-CPANSA-CSAF/develop/csaf/white/2026/cpansa-yaml-2017-20285.json - https://github.com/ingydotnet/yaml-pm/commit/471314bbdcbd62077eea32755929122aa8bd00a3.patch external
https://github.com/ingydotnet/yaml-pm/commit/471314bbdcbd62077eea32755929122aa8bd00a3.patch - https://github.com/ingydotnet/yaml-pm/commit/7736f38bd02e4f9f77d5468721e3be3d7b34a8ec.patch external
https://github.com/ingydotnet/yaml-pm/commit/7736f38bd02e4f9f77d5468721e3be3d7b34a8ec.patch - https://github.com/ingydotnet/yaml-pm/issues/176 external
https://github.com/ingydotnet/yaml-pm/issues/176 - https://metacpan.org/release/TINITA/YAML-1.30/changes external
https://metacpan.org/release/TINITA/YAML-1.30/changes - http://www.openwall.com/lists/oss-security/2026/10/05/8 external
http://www.openwall.com/lists/oss-security/2026/10/05/8 - CVE-2017-20285 (NVD) external
https://nvd.nist.gov/vuln/detail/CVE-2017-20285
Revision history
| Version | Date of the revision | Summary of the revision |
|---|---|---|
| 1 | Mon Oct 5 00:00:00 2026 | First release |
Sharing rules
TLP:WHITE
For the TLP version see: https://www.first.org/tlp/