CVE-2019-25777YAML versions before 1.27_001 for Perl allow a loaded perl/glob document to replace any…
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | libyaml-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | libyaml-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | libyaml-perl | Fix pending | 1.24-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2019-25777 |
| Ubuntu 16.04 | libyaml-perl | Fix pending | 1.15-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2019-25777 |
| Debian 14 | libyaml-perl | Fixed | 1.29-1 | DEBIAN-CVE-2019-25777 |
| Debian 13 | libyaml-perl | Fixed | 1.29-1 | DEBIAN-CVE-2019-25777 |
| Debian 12 | libyaml-perl | Fixed | 1.29-1 | DEBIAN-CVE-2019-25777 |
| Red Hat Enterprise Linux 10 | perl-YAML | Not affected | ||
| Red Hat Enterprise Linux 9 | perl-YAML | Not affected | ||
| Red Hat Enterprise Linux 8 | perl-YAML | Fixed | 0:1.24-4.module+el8.10.0+25073+d1062575 | RHSA-2026:93471 |
| Red Hat Enterprise Linux 7 | perl-YAML | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | perl-YAML | Not affected | ||
| AlmaLinux 8 | perl-YAML | Fixed | 1.24-4.module_el8.10.0+4341+ab0ec422 | ALSA-2026:93471 |
| Rocky Linux 8 | perl-YAML | Fixed | 0:1.24-4.module+el8.10.0+40403+9457ea6c | RLSA-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.
- YAML: affected: before 1.27_001; fixed in
1.27_001
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:
- https://github.com/ingydotnet/yaml-pm/commit/bace96b5e6661d521c7c515c94a09e081c911fce.pat… (patch)
- https://metacpan.org/release/TINITA/YAML-1.28/changes (release-notes)
References
- https://github.com/ingydotnet/yaml-pm/issues/212
- https://github.com/ingydotnet/yaml-pm/commit/bace96b5e6661d521c7c515c94a09e081c911fce.patch
- https://metacpan.org/release/TINITA/YAML-1.28/changes
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.