CVEfocus › CVE database › CVE-2017-20285

CVE-2017-20285YAML versions before 1.30 for Perl allow a loaded document to trigger the DESTROY method…

CVSS 9.1 CriticalEPSS 0.3% (higher than 20% of CVEs)Published 2026-10-05Updated 2026-10-06Assigner: CPANSec

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.

CWE-470CWE-502

What to do

Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fixed
3Fix pending
5Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04libyaml-perlNot affected
vulnerable_code_not_present
Ubuntu 22.04libyaml-perlNot affected
vulnerable_code_not_present
Ubuntu 18.04libyaml-perlFix pending1.24-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2017-20285
Ubuntu 16.04libyaml-perlFix pending1.15-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2017-20285
Debian 14libyaml-perlFixed1.30-1DEBIAN-CVE-2017-20285
Debian 13libyaml-perlFixed1.30-1DEBIAN-CVE-2017-20285
Debian 12libyaml-perlFixed1.30-1DEBIAN-CVE-2017-20285
Red Hat Enterprise Linux 10perl-YAMLNot affected
Red Hat Enterprise Linux 9perl-YAMLNot affected
Red Hat Enterprise Linux 8perl-YAMLFixed0:1.24-4.module+el8.10.0+25073+d1062575RHSA-2026:93471
Red Hat Enterprise Linux 7perl-YAMLFix pending
Affected
Red Hat Enterprise Linux 6perl-YAMLNot affected
AlmaLinux 8perl-YAMLFixed1.24-4.module_el8.10.0+4341+ab0ec422ALSA-2026:93471
Rocky Linux 8perl-YAMLFixed0:1.24-4.module+el8.10.0+40403+9457ea6cRLSA-2026:93471

What the vendor says

As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Upgrade to YAML 1.30 or later.

Workaround: For deployments that cannot upgrade to YAML 1.30, set $YAML::LoadBlessed = 0 before loading untrusted input. The option exists from YAML 1.25.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.