Encode.pm, as distributed in Perl through 5.34.0, allows local users to gain privileges…
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA. Impact type from CWE-427.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:p5-encode_project:p5-encode:*:*:*:*:*:*:*:* | 3.05 to before 3.12 | Vulnerable | P5-encode Project |
| cpe:2.3:a:perl:perl:*:*:*:*:*:*:*:* | up to 5.34.0 | Running on | Perl |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* | 33 | Vulnerable | Fedoraproject |
- cpe:2.3:a:p5-encode_project:p5-encode:*:*:*:*:*:*:*:* Versions 3.05 to before 3.12 Vulnerable ·P5-encode Project
- cpe:2.3:a:perl:perl:*:*:*:*:*:*:*:* Versions up to 5.34.0 Running on ·Perl
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
Remediation
No fixed version listed by the sources yet.
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 4 products
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Software Collections
Timeline
- 2026-10-02 Threatist record created from CVE-2021-36770
- 2026-10-03 Alias added: GHSA-3gfh-9hwx-r3vr
References
Patch 2
Sources
- CVE-2021-36770 · CVE Program
- CVE-2021-36770 · NVD
- FIRST EPSS
- GHSA-3gfh-9hwx-r3vr · GitHub Advisory Database · CC BY 4.0
- CVE-2021-36770 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences