CVE-2021-36770
publishedperl-Encode: bug in local configuration loading allows arbitrary Perl code execution placed under the current working directory
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| Alpine Linux | edge | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | edge | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.15 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.15 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.16 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.16 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.17 | perl | Fixed | 5.34.0-r1 | Package fix record |
Show 15 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.17 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.18 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.18 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.19 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.19 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.20 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.20 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.21 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.21 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.22 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.22 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.23 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.23 | perl-encode | Fixed | 3.12-r0 | Package fix record |
| Alpine Linux | v3.24 | perl | Fixed | 5.34.0-r1 | Package fix record |
| Alpine Linux | v3.24 | perl-encode | Fixed | 3.12-r0 | Package fix record |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
1- n/a
References
9- https://github.com/Perl/perl5/commit/c1a937fef07c061600a0078f4cb53fe9c2136bb9
- https://github.com/dankogai/p5-encode/commit/527e482dc70b035d0df4f8c77a00d81f8d775c74
- FEDORA-2021-44c65203cc https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5NDGQSGMEZ75FJGBKNYC75OTO7TF7XHB/
- FEDORA-2021-92e07de1dd https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6KOZYD7BH2DNIAEZ2ZL4PJ4QUVQI6Y33/
- https://metacpan.org/dist/Encode/changes
- https://news.cpanel.com/unscheduled-tsr-10-august-2021/
- https://security-tracker.debian.org/tracker/CVE-2021-36770
- https://security.netapp.com/advisory/ntap-20210909-0003/
- https://security.netapp.com/advisory/ntap-20241108-0002/
Provider assertions
2mitre · cna
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5fe2b7633e548896ec3c472705a85dad1d51fa0f3a8ab1a5613bc7ec4fbddf52
- Ingested
- 23 Sep 2026, 07:55:06 UTC
- Source record
- Official CVE record