Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2024-12905

An Improper Link Resolution Before File Access ("Link Following") and Improper Limitation of a Pathname to a Restricted Directory ("Path Traversal"). This vulnerability occurs when extracting a maliciously crafted tar file, which can result in unauthorized file writes or overwrites outside the intended extraction directory. The issue is associated with index.js in the tar-fs package. This issue affects tar-fs: from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, from 3.0.0 before 3.0.8.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-12905
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 18:36 UTC · Revision 1

Source evidence

CVE-2024-12905

core-osv · Original source

Published 27 Mar 2025, 16:25 UTC

An Improper Link Resolution Before File Access ("Link Following") and Improper Limitation of a Pathname to a Restricted Directory ("Path Traversal"). This vulnerability occurs when extracting a maliciously crafted tar file, which can result in unauthorized file writes or overwrites outside the intended extraction directory. The issue is associated with index.js in the tar-fs package. This issue affects tar-fs: from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, from 3.0.0 before 3.0.8.

osv:CVE-2024-12905
Complete source record
{
  "id": "b5683a5f4dacad966949465a7913de3cbb74473a7ec738e1fc58b37fa613aa34",
  "url": "https://osv.dev/vulnerability/CVE-2024-12905",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2024-12905",
    "summary": "An Improper Link Resolution Before File Access (\"Link Following\") and Improper Limitation of a Pathname to a Restricted Directory (\"Path Traversal\"). This vulnerability occurs when extracting a maliciously crafted tar file, which can result in unauthorized file writes or overwrites outside the intended extraction directory. The issue is associated with index.js in the tar-fs package. This issue affects tar-fs: from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, from 3.0.0 before 3.0.8.",
    "evidence": "osv:CVE-2024-12905",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-12905",
      "aliases": [
        "CVE-2024-12905",
        "GHSA-pq67-2wwv-3xjx"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mafintosh/tar-fs",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "ff6510d7ba63b6ee200442b80f4326f369e7d4bd"
                },
                {
                  "introduced": "0f54a78bcc8735c4257177fd004c2f9e55c588bb"
                },
                {
                  "fixed": "d97731b0e1b8a244ab859784b514cfcf5585ad3d"
                },
                {
                  "introduced": "6d66143dc5e40480dd6135a4453f6da26a5602e0"
                },
                {
                  "fixed": "e4a7a401e80267247b8e9e39d8e5ba82c4fe2f7b"
                },
                {
                  "fixed": "a1dd7e7c7f4b4a8bd2ab60f513baca573b44e2ed"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0.0.0"
                      },
                      {
                        "fixed": "1.16.4"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "ChangesAt"
                  },
                  {
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "fixed": "2.1.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "ChangesAt"
                  },
                  {
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "fixed": "3.0.8"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "ChangesAt"
                  },
                  {
                    "range": [
                      {
                        "fixed": "a1dd7e7c7f4b4a8bd2ab60f513baca573b44e2ed"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.16.3",
            "v2.1.1",
            "v3.0.6",
            "v3.0.5",
            "v3.0.4",
            "v3.0.3",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v2.1.0",
            "v2.0.1",
            "v2.0.0",
            "v1.16.2",
            "v1.16.1",
            "v1.16.0",
            "v1.15.3",
            "v1.15.2",
            "v1.15.1",
            "v1.15.0",
            "v1.14.0",
            "v1.13.2",
            "v1.13.1",
            "v1.13.0",
            "v1.12.0",
            "v1.11.1",
            "v1.11.0",
            "v1.10.0",
            "v1.9.0",
            "v1.8.1",
            "v1.8.0",
            "v1.7.0",
            "v1.6.0",
            "v1.5.1",
            "v1.5.0",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.0",
            "v1.2.0",
            "v1.1.0",
            "v1.0.0",
            "v0.5.2",
            "v0.5.1",
            "v0.5.0",
            "v0.4.1",
            "v0.4.0",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.8",
            "v0.1.7",
            "v0.1.5",
            "v0.1.4",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-12905.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.497260108Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2025/06/msg00012.html",
        "https://registry.npmjs.org",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/12xxx/CVE-2024-12905.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-12905",
        "https://github.com/mafintosh/tar-fs/commit/a1dd7e7c7f4b4a8bd2ab60f513baca573b44e2ed",
        "https://github.com/mafintosh/tar-fs",
        "https://www.seal.security/blog/a-link-to-the-past-uncovering-a-new-vulnerability-in-tar-fs"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22",
          "CWE-59"
        ],
        "cna_assigner": "seal",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/12xxx/CVE-2024-12905.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-12905",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 498515,
  "published_at": "2025-03-27T16:25:34.41+00:00"
}