PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2019-25777: 
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2019-25777 is an arbitrary code execution vulnerability in the YAML module for Perl (perl-yaml) affecting all versions before 1.27_001. The flaw allows a loaded perl/glob document to replace any package variable without restriction, enabling an attacker to enable code loading and subsequently execute arbitrary Perl code. The vulnerability was originally discovered and fixed in April 2019, but a CVE number was not reserved until September 2026 and formally published in October 2026. It carries a CVSS v3.1 base score of 7.3 (High) (Github Advisory, Red Hat).

Technical details

The root cause is classified under CWE-502 (Deserialization of Untrusted Data) and CWE-914 (Improper Control of Dynamically-Identified Variables). When the YAML module processes a perl/glob document, it assigns values to arbitrary package variables — including $YAML::LoadCode or $YAML::UseCode — without checking whether code loading is permitted. By supplying a first YAML document that sets one of these variables to a truthy value, an attacker enables code loading for the entire process; a subsequent perl/code document passed to any Load() call in the same process is then evaluated via Perl's string eval, achieving arbitrary code execution. The fix, committed on April 27, 2019, gates glob loading behind the $loader->load_code check in lib/YAML/Types.pm (GitHub Issue, Commit Patch, oss-security).

Impact

Successful exploitation allows an unauthenticated remote attacker to execute arbitrary Perl code with the privileges of the application process that calls YAML::Load(). This can result in full compromise of the affected application, including unauthorized data access (confidentiality), data modification (integrity), and service disruption (availability). Because the attack operates within the application process, it may also facilitate lateral movement to other systems or services accessible from the compromised host (Red Hat Bugzilla, Github Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time (Feedly). The vulnerability is automatable (no user interaction required) and requires no authentication, but exploitation depends on an attacker being able to supply two separate YAML documents to distinct Load() calls within the same process. The EPSS score is approximately 0.22–0.34%, placing it in the lower percentiles for near-term exploitation likelihood (Github Advisory). The CVE is not listed in the CISA Known Exploited Vulnerabilities catalog.

Exploitation steps

  1. Identify target: Locate a Perl application that uses the YAML module (versions before 1.27_001) and accepts untrusted YAML input via multiple Load() calls within the same process.
  2. Craft first payload (glob document): Construct a YAML document using the perl/glob tag that sets $YAML::LoadCode or $YAML::UseCode to 1, enabling code loading for the process:
--- !!perl/glob
PACKAGE: YAML
NAME: LoadCode
SCALAR: 1
  1. Submit first document: Supply this document to the application so it is processed by a YAML::Load() call, silently enabling code execution for all subsequent loads in the process.
  2. Craft second payload (code document): Construct a perl/code YAML document containing the arbitrary Perl code to execute:
--- !!perl/code
'system("id"); 1'
  1. Submit second document: Supply this document to a subsequent YAML::Load() call in the same process; the code is passed to string eval and executed with the application's privileges (GitHub Issue, oss-security).

Indicators of compromise

  • Logs: Application logs showing YAML parsing of documents containing !!perl/glob or !!perl/code tags from untrusted input sources; unexpected Perl eval errors or warnings in application logs.
  • Process: Unusual child processes spawned by the Perl application process (e.g., shell commands, network utilities like curl, wget, or nc) that are inconsistent with normal application behavior.
  • File System: Unexpected new files, scripts, or web shells created by the application process user; modifications to Perl library files or application configuration.
  • Network: Unexpected outbound connections from the application server to external IPs, particularly on non-standard ports, originating from the Perl application process.

Mitigation and workarounds

Upgrade the Perl YAML module to version 1.28 or later (which includes the fix first released in 1.27_001 on April 27, 2019). As an immediate workaround for deployments that cannot upgrade, set $YAML::LoadBlessed = 0 before processing any untrusted YAML input; this option, available since YAML 1.25, gates glob loading and prevents the exploit chain. Additionally, implement input validation to reject YAML documents containing perl/glob or perl/code tags from untrusted sources (oss-security, Red Hat Bugzilla).

Community reactions

The vulnerability was disclosed to the oss-security mailing list in October 2026 by Stig Palmquist on behalf of the CPAN Security Group, noting the original fix had been available since April 2019 but lacked a formal CVE assignment for over seven years (oss-security). Red Hat triaged the issue as high severity and opened a tracking bug, while Ubuntu issued security notice USN-8925-1 addressing the vulnerability in the yaml/libyaml packages. Community discussion on Bluesky and security aggregators noted the long gap between the original fix and CVE assignment as a common challenge in open-source ecosystem vulnerability management.

Additional resources


Source: This report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-89419MEDIUM5.4
  • Linux Debian logoLinux Debian
  • ironic
NoNoOct 23, 2026
CVE-2026-90458MEDIUM4.7
  • Linux Debian logoLinux Debian
  • ironic
NoNoOct 23, 2026
CVE-2026-85559NONEN/A
  • Linux Debian logoLinux Debian
  • pdns-recursor
NoYesOct 23, 2026
CVE-2026-85558NONEN/A
  • Linux Debian logoLinux Debian
  • pdns-recursor
NoYesOct 23, 2026
CVE-2026-85557NONEN/A
  • Linux Debian logoLinux Debian
  • pdns-recursor
NoYesOct 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management