CVEfocus › CVE database › CVE-2019-25777

CVE-2019-25777YAML versions before 1.27_001 for Perl allow a loaded perl/glob document to replace any…

CVSS 7.3 HighEPSS 0.4% (higher than 21% of CVEs)Published 2026-10-05Updated 2026-10-06Assigner: CPANSec

YAML versions before 1.27_001 for Perl allow a loaded perl/glob document to replace any package variable, which can lead to arbitrary code execution. A perl/glob document names a package and a symbol, and supplies the value assigned to it. Nothing restricts the name, so the target can be @INC or YAML's own load options. A perl/glob document that sets $YAML::LoadCode or $YAML::UseCode turns on code loading, which is off by default, for every later Load() in the process. A perl/code document is then passed to a string eval, so an attacker who supplies two documents to separate Load() calls in one process can execute arbitrary Perl code.

CWE-502CWE-914

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-2019-25777
Ubuntu 16.04libyaml-perlFix pending1.15-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2019-25777
Debian 14libyaml-perlFixed1.29-1DEBIAN-CVE-2019-25777
Debian 13libyaml-perlFixed1.29-1DEBIAN-CVE-2019-25777
Debian 12libyaml-perlFixed1.29-1DEBIAN-CVE-2019-25777
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.28 or later.

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

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.