Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-36770

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-36770
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:50 UTC · Revision 1

Source evidence

CVE-2021-36770

core-osv · Original source

Published 11 Aug 2021, 23:15 UTC

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.

osv:CVE-2021-36770
Complete source record
{
  "id": "8305da678c7fe0f85f2b5e3c3576439c377da3fa45321cc7e08fe073dcf39b95",
  "url": "https://osv.dev/vulnerability/CVE-2021-36770",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-36770",
    "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.",
    "evidence": "osv:CVE-2021-36770",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-36770",
      "aliases": [
        "CVE-2021-36770"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/dankogai/p5-encode",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f88692871dce592438c65a8d6ea42b3897f18033"
                },
                {
                  "fixed": "527e482dc70b035d0df4f8c77a00d81f8d775c74"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:p5-encode_project:p5-encode:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.05"
                      },
                      {
                        "fixed": "3.12"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "527e482dc70b035d0df4f8c77a00d81f8d775c74"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.11",
            "3.10",
            "3.09",
            "3.08",
            "3.07",
            "3.06",
            "3.05"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-36770.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/perl/perl5",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "c1a937fef07c061600a0078f4cb53fe9c2136bb9"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "c1a937fef07c061600a0078f4cb53fe9c2136bb9"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v5.34.0",
            "v5.35.0",
            "v5.34.0-RC2",
            "v5.34.0-RC1",
            "v5.33.9",
            "v5.33.8",
            "v5.33.7",
            "v5.32.0",
            "v5.33.4",
            "v5.33.3",
            "v5.33.2",
            "v5.33.1",
            "v5.33.0",
            "v5.32.0-RC1",
            "v5.31.11",
            "v5.31.7",
            "v5.31.5",
            "v5.30.0",
            "v5.31.4",
            "v5.31.3",
            "v5.31.2",
            "v5.31.1",
            "v5.31.0",
            "v5.30.0-RC2",
            "v5.30.0-RC1",
            "v5.29.10",
            "v5.29.9",
            "v5.29.8",
            "v5.29.7",
            "v5.29.6",
            "v5.29.5",
            "v5.28.0",
            "v5.29.1",
            "v5.29.0",
            "v5.28.0-RC4",
            "v5.28.0-RC3",
            "v5.28.0-RC2",
            "v5.28.0-RC1",
            "v5.27.11",
            "v5.27.10",
            "v5.27.8",
            "v5.27.7",
            "v5.27.6",
            "v5.27.5",
            "v5.27.3",
            "v5.26.0",
            "v5.27.0",
            "v5.26.0-RC2",
            "v5.25.11",
            "v5.25.9",
            "v5.25.7",
            "v5.25.5",
            "v5.25.4",
            "v5.25.3",
            "v5.24.0",
            "v5.25.2",
            "v5.25.0",
            "v5.24.0-RC5",
            "v5.24.0-RC4",
            "v5.24.0-RC3",
            "v5.24.0-RC2",
            "v5.24.0-RC1",
            "v5.23.7",
            "v5.23.6",
            "v5.23.4",
            "v5.23.3",
            "if-0.0605",
            "v5.23.2",
            "v5.23.1",
            "v5.23.0",
            "v5.22.0",
            "v5.22.0-RC2",
            "v5.22.0-RC1",
            "v5.21.11",
            "if-0.0604",
            "v5.21.10",
            "v5.21.9",
            "v5.21.8",
            "v5.21.6",
            "v5.21.5",
            "v5.21.4",
            "v5.21.1",
            "v5.21.0",
            "v5.20.0",
            "v5.20.0-RC1",
            "v5.19.11",
            "v5.19.7",
            "v5.19.5",
            "v5.19.3",
            "v5.19.2",
            "if-0.0603",
            "v5.19.1",
            "v5.18.0",
            "v5.19.0",
            "v5.18.0-RC4",
            "v5.18.0-RC3",
            "v5.18.0-RC2",
            "v5.18.0-RC1",
            "v5.17.9",
            "v5.17.8",
            "v5.17.7.0",
            "v5.17.7",
            "v5.17.6",
            "v5.17.4",
            "v5.17.2",
            "v5.17.0",
            "v5.16.0",
            "v5.16.0-RC2",
            "v5.16.0-RC1",
            "v5.15.9",
            "v5.15.5",
            "v5.15.4",
            "v5.15.3",
            "v5.15.2",
            "v5.15.1",
            "v5.15.0",
            "v5.14.0",
            "v5.14.0-RC3",
            "v5.14.0-RC2",
            "v5.14.0-RC1",
            "v5.13.11",
            "v5.13.10",
            "v5.13.9",
            "v5.13.8",
            "v5.13.7",
            "v5.13.6",
            "v5.13.5",
            "v5.13.4",
            "v5.13.3",
            "v5.13.2",
            "v5.13.1",
            "v5.12.0",
            "v5.13.0",
            "v5.12.0-RC5",
            "v5.12.0-RC4",
            "v5.12.0-RC3",
            "v5.12.0-RC2",
            "v5.12.0-RC1",
            "v5.12.0-RC0",
            "v5.11.5",
            "v5.11.4",
            "v5.11.3",
            "v5.11.1",
            "v5.11.0",
            "GitLive-blead",
            "v5.10.0",
            "perl-5.9.5",
            "perl-5.9.4",
            "perl-5.9.3",
            "perl-5.9.2",
            "perl-5.9.1",
            "perl-5.9.0",
            "perl-5.8.0",
            "perl-5.7.3",
            "perl-5.7.2",
            "perl-5.7.1",
            "perl-5.7.0",
            "perl-5.6.0",
            "perl-5.005",
            "perl-5.003",
            "perl-5.002_01",
            "perl-5.002",
            "perl-5.001n",
            "perl-5.001",
            "perl-5.000o",
            "perl-5.000",
            "perl-5a9",
            "perl-5a2",
            "perl-4.0.36",
            "perl-4.0.00",
            "perl-3.044",
            "perl-3.000",
            "perl-2.0",
            "perl-1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-36770.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:48.872342840Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5NDGQSGMEZ75FJGBKNYC75OTO7TF7XHB/",
        "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/",
        "https://github.com/Perl/perl5/commit/c1a937fef07c061600a0078f4cb53fe9c2136bb9",
        "https://github.com/dankogai/p5-encode/commit/527e482dc70b035d0df4f8c77a00d81f8d775c74"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*",
              "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "34"
                  },
                  {
                    "last_affected": "34"
                  },
                  {
                    "introduced": "33"
                  },
                  {
                    "last_affected": "33"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-36770",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 386184,
  "published_at": "2021-08-11T23:15:07.707+00:00"
}