Skip to content

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

HighCVSS 7.3 EPSS 0.35%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial
Technology
UbuntuDebianRed Hat

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.

Upgrade path

8 packages: 6 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
redhat/perl-YAML(Red Hat rhel_els 7) All versions No fix listed No fix yet
redhat/perl-YAML:1.24-8100020261013125111.ae2fb4b8(Red Hat enterprise_linux 8) All versions No fix listed No fix yet
cpan YAML < 1.27_001 1.27_001 Fixed
debian/libyaml-perl(Debian 12) < 1.29-1 1.29-1 Fixed
debian/libyaml-perl(Debian 13) < 1.29-1 1.29-1 Fixed
debian/libyaml-perl(Debian 14) < 1.29-1 1.29-1 Fixed
ubuntu/libyaml-perl(Ubuntu Pro 16.04) < 1.15-1ubuntu0.1~esm1; = 1.13-1; = 1.15-1 1.15-1ubuntu0.1~esm1 Fixed
ubuntu/libyaml-perl(Ubuntu Pro 18.04) < 1.24-1ubuntu0.1~esm1; = 1.21-1; = 1.24-1 1.24-1ubuntu0.1~esm1 Fixed

Affected products

ProductAffected versionsFixed in
redhat/perl-YAML:1.24-8100020261013125111.ae2fb4b8(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/perl-YAML(Red Hat:rhel_els:7) All versions No fix listed
debian/libyaml-perl(Debian:12) < 1.29-1 1.29-1
debian/libyaml-perl(Debian:13) < 1.29-1 1.29-1
debian/libyaml-perl(Debian:14) < 1.29-1 1.29-1
cpan YAML < 1.27_001 1.27_001
ubuntu/libyaml-perl(Ubuntu:Pro:16.04) < 1.15-1ubuntu0.1~esm1 1.15-1ubuntu0.1~esm1
ubuntu/libyaml-perl(Ubuntu:Pro:16.04) = 1.13-1 No fix listed
ubuntu/libyaml-perl(Ubuntu:Pro:16.04) = 1.15-1 No fix listed
ubuntu/libyaml-perl(Ubuntu:Pro:18.04) < 1.24-1ubuntu0.1~esm1 1.24-1ubuntu0.1~esm1
ubuntu/libyaml-perl(Ubuntu:Pro:18.04) = 1.21-1 No fix listed
ubuntu/libyaml-perl(Ubuntu:Pro:18.04) = 1.24-1 No fix listed

References