CVE-2021-36770

perl-Encode: bug in local configuration loading allows arbitrary Perl code execution placed under the current working directory

Published Aug 11, 2021 CVSS 3.1 · 7.8 High EPSS 1.4% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2021-23358 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.
Ubuntu USN Ubuntu USN USN-5033-1 Perl vulnerability
Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Nov 3, 2025, 9:45 PM
Reserved
Jul 17, 2021, 12:00 AM
Status
Modified
Published
Aug 11, 2021, 11:15 PM
Modified
Jun 17, 2026, 3:59 AM
Severity
Important
Public date
Aug 9, 2021, 12:00 AM