# CVE-2019-25777: 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

- Severity: High 7.3 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 30% of CVEs (2026-12-01)
- Published: 2026-10-05T06:50:17.532Z
- Modified: 2026-10-06T17:17:09.893Z
- Weaknesses: CWE-502, CWE-914
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: CPANSec

## 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.

(As written by CVE List.)

## Affected

- YAML: before 1.27_001

## References

- <https://github.com/ingydotnet/yaml-pm/issues/212> (issue-tracking)
- <https://github.com/ingydotnet/yaml-pm/commit/bace96b5e6661d521c7c515c94a09e081c911fce.patch> (patch)
- <https://metacpan.org/release/TINITA/YAML-1.28/changes> (release-notes)
- <http://www.openwall.com/lists/oss-security/2026/10/05/7>

## Sources

- CVE List: [CVE-2019-25777](https://www.cve.org/CVERecord?id=CVE-2019-25777), CVE Terms of Use, modified 2026-10-06
- NVD: [CVE-2019-25777](https://nvd.nist.gov/vuln/detail/CVE-2019-25777), Public domain, modified 2026-10-06

---

Page: https://cve.day/CVE-2019-25777 · Whole record: https://cve.day/CVE-2019-25777.json · Rebuilt by cve.day 2026-11-25T22:57:50.467Z
