CVE-2021-32610: Pear/archive tar Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-p8q8-jfcv-g2h2
CVSS 7.1
CWE-59
Published
Advisory Summary

CVE-2021-32610 is a HIGH (CVSS 7.1) path traversal vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Pear/archive tar libraries in the Packagist ecosystem. The issue involves directory traversal in archive_tar. Remediation is available by upgrading affected packages to version 1.4.14.

CVE-2021-32610 at a Glance

CVE Identifier CVE-2021-32610
GHSA Identifier GHSA-p8q8-jfcv-g2h2
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Pear/archive tar
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2021-32610

To remediate this vulnerability, upgrade all affected Pear/archive tar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pear/archive_tar fixed: 1.4.14
Upgrade pear/archive_tar to 1.4.14
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for pear/archive_tar

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-32610, inspect your project dependencies for Pear/archive tar:

inspect dependencies for pear/archive_tar

Analyze the terminal output to locate any version of Pear/archive tar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.14), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Pear/archive tar, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

In Archive_Tar before 1.4.14, symlinks can refer to targets outside of the extracted archive, a different vulnerability than CVE-2020-36193.

CVE-2021-32610 Affected Pear/archive tar Versions

1 component(s)
Fixed Versions:
1.4.14
Product / Package Ecosystem Affected Versions Fixed Version
pear/archive_tar
Packagist
< 1.4.14
1.4.14

References

Frequently Asked Questions

What is CVE-2021-32610?
CVE-2021-32610 is a security vulnerability in Pear/archive tar involving Directory Traversal in Archive_Tar under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Pear/archive tar versions are affected?
Affected versions include releases prior to 1.4.14 across affected packages: pear/archive_tar.
What version fixes CVE-2021-32610?
Upgrading to 1.4.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pear/archive_tar affected?
Yes, pear/archive_tar is affected in releases prior to 1.4.14. Upgrade your dependency to 1.4.14 or later.
What is the CVSS score of CVE-2021-32610?
CVE-2021-32610 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2021-32610?
CVE-2021-32610 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check Packagist dependencies for CVE-2021-32610?
Run the dependency tree command: 'inspect dependencies for pear/archive_tar'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p8q8-jfcv-g2h2",
  "modified" : "2021-09-20T20:26:41Z",
  "published" : "2021-08-09T20:40:06Z",
  "aliases" : [ "CVE-2021-32610" ],
  "summary" : "Directory Traversal in Archive_Tar",
  "details" : "In Archive_Tar before 1.4.14, symlinks can refer to targets outside of the extracted archive, a different vulnerability than CVE-2020-36193.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "pear/archive_tar"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32610"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pear/Archive_Tar/commit/7789ebb2f34f9e4adb3a4152ad0d1548930a9755"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pear/Archive_Tar/commit/b5832439b1f37331fb4f87e67fe4f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pear/Archive_Tar"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pear/Archive_Tar/releases/tag/1.4.14"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/07/msg00023.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/42GPGVVFTLJYAKRI75IVB5R45NYQGEUR"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CAODVMHGL5MHQWQAQTXQ7G7OE3VQZ7LS"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/G5LTY6COQYNMMHQJ3QIOJHEWCKD4XDFH"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VJQQYDAOWHD6RDITDRPHFW7WY6BS3V5N"
  }, {
    "type" : "WEB",
    "url" : "https://www.drupal.org/sa-core-2021-004"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-02T18:04:45Z",
    "nvd_published_at" : "2021-07-30T14:15:00Z"
  }
}