Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2017-20285
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 10:31 UTC · Revision 1
Source evidence
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.
osv:CVE-2017-20285
Complete source record
{
"id": "3fd631d975711ecac01d9977e54a4725d41a8d728b669b491d37c5ed1828a97d",
"url": "https://osv.dev/vulnerability/CVE-2017-20285",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2017-20285",
"summary": "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.",
"evidence": "osv:CVE-2017-20285",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2017-20285",
"aliases": [
"CVE-2017-20285"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/ingydotnet/yaml-pm",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "a3abf039c0b369dd6ea31ab0e7836b7f04ff0678"
},
{
"fixed": "471314bbdcbd62077eea32755929122aa8bd00a3"
},
{
"fixed": "7736f38bd02e4f9f77d5468721e3be3d7b34a8ec"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.30"
}
],
"source": "DESCRIPTION"
},
{
"range": [
{
"fixed": "471314bbdcbd62077eea32755929122aa8bd00a3"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "7736f38bd02e4f9f77d5468721e3be3d7b34a8ec"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"1.24",
"1.23_003",
"old-yaml-pm-1.23",
"1.23",
"1.22",
"1.21",
"1.20_002",
"1.20_001",
"1.20",
"1.19_001",
"1.19",
"1.18_001",
"1.18",
"1.17",
"1.16_002",
"1.16_001",
"1.16",
"1.15",
"1.14",
"1.13",
"1.12",
"1.11",
"1.10",
"1.09",
"1.08",
"1.07",
"1.06",
"1.05",
"1.04",
"1.03",
"1.02",
"1.01",
"1.00",
"0.99",
"0.98",
"0.97",
"0.96",
"0.95",
"0.94",
"0.93",
"v0.92",
"v0.91",
"v0.90",
"v0.89",
"0.88",
"0.87",
"0.86",
"0.85",
"0.84",
"0.83",
"0.82",
"0.81",
"0.80",
"0.79",
"0.78",
"0.74",
"0.77",
"0.76",
"0.75",
"0.73",
"0.72",
"0.71",
"0.70",
"0.68",
"0.67",
"0.66",
"0.65",
"0.64",
"0.63",
"0.62",
"0.61",
"0.60",
"0.58",
"0.57",
"0.56",
"0.55",
"0.54",
"0.53",
"0.52",
"0.51",
"0.50",
"0.49_70",
"0.39",
"0.38",
"0.37",
"0.36",
"0.49_01",
"0.35",
"0.30",
"0.26",
"0.25"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-20285.json"
}
}
],
"modified": "2026-10-20T10:50:32.352372373Z",
"provider": "osv",
"references": [
"https://metacpan.org/release/TINITA/YAML-1.30/changes",
"https://github.com/ingydotnet/yaml-pm/issues/176",
"https://github.com/ingydotnet/yaml-pm/commit/471314bbdcbd62077eea32755929122aa8bd00a3.patch",
"https://github.com/ingydotnet/yaml-pm/commit/7736f38bd02e4f9f77d5468721e3be3d7b34a8ec.patch"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2017-20285",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 381833,
"published_at": "2026-10-05T07:16:29.017+00:00"
}