CVEfocus › CVE database › CVE-2021-36770

CVE-2021-36770

CVSS 7.8 HighEPSS 1.4% (higher than 73% of CVEs)Published 2021-08-11Updated 2025-11-03Assigner: mitre

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

27Fixed
4Fix pending
4Will not fix
10Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libencode-perlFix pendingUBUNTU-CVE-2021-36770
Ubuntu 26.04libencode-perlFix pendingUBUNTU-CVE-2021-36770
Ubuntu 25.10libencode-perlWill not fix
Introduced by change in Encode 3.05 in perl 5.32 and 5.34.
UBUNTU-CVE-2021-36770
Ubuntu 24.04libencode-perlFix pendingUBUNTU-CVE-2021-36770
Ubuntu 22.04libencode-perlFix pendingUBUNTU-CVE-2021-36770
Ubuntu 22.04perlFixed5.32.1-3ubuntu3UBUNTU-CVE-2021-36770
Ubuntu 20.04libencode-perlNot affected
vulnerable_code_not_present
Ubuntu 18.04libencode-perlNot affected
vulnerable_code_not_present
Ubuntu 16.04libencode-perlWill not fix
Introduced by change in Encode 3.05 in perl 5.32 and 5.34.
UBUNTU-CVE-2021-36770
Ubuntu 16.04perlWill not fix
Introduced by change in Encode 3.05 in perl 5.32 and 5.34.
Ubuntu 14.04libencode-perlWill not fix
Introduced by change in Encode 3.05 in perl 5.32 and 5.34.
Debian 14libencode-perlFixed3.08-2DEBIAN-CVE-2021-36770
Debian 14perlFixed5.32.1-5DEBIAN-CVE-2021-36770
Debian 13libencode-perlFixed3.08-2DEBIAN-CVE-2021-36770
Debian 13perlFixed5.32.1-5DEBIAN-CVE-2021-36770
Debian 12libencode-perlFixed3.08-2DEBIAN-CVE-2021-36770
Debian 12perlFixed5.32.1-5DEBIAN-CVE-2021-36770
Red Hat Enterprise Linux 9perl-EncodeNot affected
Red Hat Enterprise Linux 9perl-Encode-develNot affected
Red Hat Enterprise Linux 9perl-encodingNot affected
Red Hat Enterprise Linux 8perl-EncodeNot affected
Red Hat Enterprise Linux 8perl-Encode-develNot affected
Red Hat Enterprise Linux 8perl-encodingNot affected
Red Hat Enterprise Linux 7perl-EncodeNot affected
Red Hat Enterprise Linux 7perl-Encode-develNot affected
Alpine Linux 3.24perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.24perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.23perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.23perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.22perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.22perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.21perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.21perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.20perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.20perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.19perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.19perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.18perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.18perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.17perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.17perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.16perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.16perl-encodeFixed3.12-r0ALPINE-CVE-2021-36770
Alpine Linux 3.15perlFixed5.34.0-r1ALPINE-CVE-2021-36770
Alpine Linux 3.15perl-encodeFixed3.12-r0ALPINE-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:

References

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.