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
Summary
| CVE | CVE-2019-25777 |
|---|---|
| State | PUBLISHED |
| Assigner | CPANSec |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-10-05 07:16:29 UTC |
| Updated | 2026-10-06 17:17:09 UTC |
| Description | 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. |
Risk And Classification
Primary CVSS: v3.1 7.3 HIGH from ADP
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
EPSS: 0.002210000 probability, percentile 0.115470000 (date 2026-10-06)
Problem Types: CWE-502 | CWE-914 | CWE-914 CWE-914 Improper Control of Dynamically-Identified Variables | CWE-502 CWE-502 Deserialization of Untrusted Data
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | ADP | DECLARED | 7.3 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 7.3 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
LowIntegrity
LowAvailability
LowCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
There are no known software configurations currently associated with this CVE in NVD or the CVE Program record.
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| www.openwall.com/lists/oss-security/2026/10/05/7 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | |
| github.com/ingydotnet/yaml-pm/issues/212 | 9b29abf9-4ab0-4765-b253-1875cd9b441e | github.com | |
| metacpan.org/release/TINITA/YAML-1.28/changes | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | |
| github.com/ingydotnet/yaml-pm/commit/bace96b5e6661d521c7c515c94a09e081c9... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2019-04-27T00:00:00.000Z | Issue reported. |
| CNA | 2019-04-27T00:00:00.000Z | Version 1.27_001 released with fix. |
| CNA | 2019-04-28T00:00:00.000Z | Version 1.28 released with fix. |
| CNA | 2022-06-27T00:00:00.000Z | Issue added as CPANSA-YAML-2019-01 in the CPAN::Audit database. |
| CNA | 2026-09-21T00:00:00.000Z | CVE number reserved. |
Solutions
CNA: Upgrade to YAML 1.28 or later.
Workarounds
CNA: 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.
There are currently no legacy QID mappings associated with this CVE.