{"id":"UBUNTU-CVE-2021-36770","details":"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.","modified":"2026-05-20T16:05:04.819801767Z","published":"2021-08-09T00:00:00Z","related":["USN-5033-1"],"upstream":["CVE-2021-36770"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-36770"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5033-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-36770"}],"affected":[{"package":{"name":"libencode-perl","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/libencode-perl?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.76-1","2.78-1","2.78-1build1","2.79-1","2.82-1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.82-1","binary_name":"libencode-perl"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-36770.json"}},{"package":{"name":"libencode-perl","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/libencode-perl?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.08-2","3.16-1","3.16-1build1"],"ecosystem_specific":{"binaries":[{"binary_version":"3.16-1build1","binary_name":"libencode-perl"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-36770.json"}},{"package":{"name":"perl","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/perl?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.32.1-3ubuntu3"}]}],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"5.32.1-3ubuntu3","binary_name":"libperl5.32"},{"binary_name":"perl","binary_version":"5.32.1-3ubuntu3"},{"binary_version":"5.32.1-3ubuntu3","binary_name":"perl-base"},{"binary_name":"perl-debug","binary_version":"5.32.1-3ubuntu3"},{"binary_name":"perl-modules-5.32","binary_version":"5.32.1-3ubuntu3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-36770.json"}},{"package":{"name":"libencode-perl","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/libencode-perl?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.19-1build1","3.20-1","3.20-1build1","3.21-1","3.21-1build1","3.21-1build2"],"ecosystem_specific":{"binaries":[{"binary_name":"libencode-perl","binary_version":"3.21-1build2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-36770.json"}},{"package":{"name":"libencode-perl","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/libencode-perl?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.21-1build3"],"ecosystem_specific":{"binaries":[{"binary_name":"libencode-perl","binary_version":"3.21-1build3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-36770.json"}},{"package":{"name":"libencode-perl","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/libencode-perl?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.21-1build3"],"ecosystem_specific":{"binaries":[{"binary_name":"libencode-perl","binary_version":"3.21-1build3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-36770.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}