CVE-2021-36770
Encode.pm, as distributed in Perl through 5.34.0, allows local users to gain privileges via a Trojan horse Encode::ConfigLocal library (in the current working directory) that preempts dynamic module loading. Exploitation requires an unusual configuration, and certain 2021 versions of Encode.pm (3.05 through 3.11). This issue occurs because the || operator evaluates @INC in a scalar context, and thus @INC has only an integer value.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libencode-perl | Fix pending | UBUNTU-CVE-2021-36770 | |
| Ubuntu 26.04 | libencode-perl | Fix pending | UBUNTU-CVE-2021-36770 | |
| Ubuntu 25.10 | libencode-perl | Will not fix Introduced by change in Encode 3.05 in perl 5.32 and 5.34. | UBUNTU-CVE-2021-36770 | |
| Ubuntu 24.04 | libencode-perl | Fix pending | UBUNTU-CVE-2021-36770 | |
| Ubuntu 22.04 | libencode-perl | Fix pending | UBUNTU-CVE-2021-36770 | |
| Ubuntu 22.04 | perl | Fixed | 5.32.1-3ubuntu3 | UBUNTU-CVE-2021-36770 |
| Ubuntu 20.04 | libencode-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | libencode-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | libencode-perl | Will not fix Introduced by change in Encode 3.05 in perl 5.32 and 5.34. | UBUNTU-CVE-2021-36770 | |
| Ubuntu 16.04 | perl | Will not fix Introduced by change in Encode 3.05 in perl 5.32 and 5.34. | ||
| Ubuntu 14.04 | libencode-perl | Will not fix Introduced by change in Encode 3.05 in perl 5.32 and 5.34. | ||
| Debian 14 | libencode-perl | Fixed | 3.08-2 | DEBIAN-CVE-2021-36770 |
| Debian 14 | perl | Fixed | 5.32.1-5 | DEBIAN-CVE-2021-36770 |
| Debian 13 | libencode-perl | Fixed | 3.08-2 | DEBIAN-CVE-2021-36770 |
| Debian 13 | perl | Fixed | 5.32.1-5 | DEBIAN-CVE-2021-36770 |
| Debian 12 | libencode-perl | Fixed | 3.08-2 | DEBIAN-CVE-2021-36770 |
| Debian 12 | perl | Fixed | 5.32.1-5 | DEBIAN-CVE-2021-36770 |
| Red Hat Enterprise Linux 9 | perl-Encode | Not affected | ||
| Red Hat Enterprise Linux 9 | perl-Encode-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | perl-encoding | Not affected | ||
| Red Hat Enterprise Linux 8 | perl-Encode | Not affected | ||
| Red Hat Enterprise Linux 8 | perl-Encode-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | perl-encoding | Not affected | ||
| Red Hat Enterprise Linux 7 | perl-Encode | Not affected | ||
| Red Hat Enterprise Linux 7 | perl-Encode-devel | Not affected | ||
| Alpine Linux 3.24 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.24 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.23 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.23 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.22 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.22 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.21 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.21 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.20 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.20 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.19 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.19 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.18 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.18 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.17 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.17 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.16 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.16 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.15 | perl | Fixed | 5.34.0-r1 | ALPINE-CVE-2021-36770 |
| Alpine Linux 3.15 | perl-encode | Fixed | 3.12-r0 | ALPINE-CVE-2021-36770 |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://metacpan.org/dist/Encode/changes
- https://security-tracker.debian.org/tracker/CVE-2021-36770
- https://github.com/dankogai/p5-encode/commit/527e482dc70b035d0df4f8c77a00d81f8d775c74
- https://github.com/Perl/perl5/commit/c1a937fef07c061600a0078f4cb53fe9c2136bb9
- https://news.cpanel.com/unscheduled-tsr-10-august-2021/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6KOZYD7BH2DNIAEZ2ZL4PJ4QUVQI6Y33/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5NDGQSGMEZ75FJGBKNYC75OTO7TF7XHB/
- https://security.netapp.com/advisory/ntap-20210909-0003/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.