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.

High 7.3 Published Updated

Attackers can execute arbitrary Perl code by crafting malicious YAML documents that manipulate internal variables to enable code evaluation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-25777?

CVE-2019-25777 is a high-severity unsafe deserialization vulnerability, published on 5 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-914, CWE-502

Which versions are affected by CVE-2019-25777?

How do I fix CVE-2019-25777?

Upgrade to a fixed version.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2019-25777 being exploited?

There is no known exploitation of CVE-2019-25777 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2019-25777, GHSA-38xx-2hm6-vh7q, UBUNTU-CVE-2019-25777.

Is CVE-2019-25777 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free