GHSA-W75W-9QV4-J5XJ

Vulnerability from github – Published: 2026-03-05 00:59 – Updated: 2026-03-06 22:51
VLAI?
Summary
dbt-common's commonprefix() doesn't protect against path traversal
Details

Impact

What kind of vulnerability is it? Who is impacted?

A path traversal vulnerability exists in dbt-common's safe_extract() function used when extracting tarball archives. The function uses os.path.commonprefix() to validate that extracted files remain within the intended destination directory. However, commonprefix() compares paths character-by-character rather than by path components, allowing a malicious tarball to write files to sibling directories with matching name prefixes.

For example, when extracting to /tmp/packages, a crafted tarball could write files to /tmp/packagesevil/ by exploiting the character-based prefix matching.

This vulnerability affects users who: - Install dbt packages from untrusted sources - Process tarball archives through dbt-common's extraction utilities

The practical risk is limited because: - Exploitation requires a malicious tarball to be processed - File writes are restricted to sibling directories with matching prefixes (not arbitrary paths) - Packages from trusted sources (dbt Hub) are not affected

This is similar to CVE-2026-1703 in pip, which had a CVSS score of 3.9 (Low).

Patches

Has the problem been patched? What versions should users upgrade to?

Fixed in dbt-common version 1.37.3 & 1.34.2, and patched for dbt-core 1.11.7 and 1.10.20 releases.

The fix replaces os.path.commonprefix() with os.path.commonpath(), which correctly compares paths by their components rather than characters.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

  • Only install dbt packages from trusted sources (official dbt Hub, verified git repositories)
  • Avoid installing packages from untrusted URLs or unverified third parties
  • Review package contents before installation when sourcing from external locations

Resources

Are there any links users can visit to find out more?

  1. CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): https://cwe.mitre.org/data/definitions/22.html
  2. CVE-2026-1703 (similar vulnerability in pip): https://nvd.nist.gov/vuln/detail/CVE-2026-1703
  3. pip fix PR #13777: https://github.com/pypa/pip/pull/13777
  4. Python documentation on commonpath vs commonprefix: https://docs.python.org/3/library/os.path.html#os.path.commonpath
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "dbt-common"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.34.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "dbt-common"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.35.0"
            },
            {
              "fixed": "1.37.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-29790"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-05T00:59:10Z",
    "nvd_published_at": "2026-03-06T21:16:15Z",
    "severity": "LOW"
  },
  "details": "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nA path traversal vulnerability exists in dbt-common\u0027s `safe_extract()` function used when extracting tarball archives. The function uses `os.path.commonprefix()` to validate that extracted files remain within the intended destination directory. However, `commonprefix()` compares paths character-by-character rather than by path components, allowing a malicious tarball to write files to sibling directories with matching name prefixes.\n\nFor example, when extracting to `/tmp/packages`, a crafted tarball could write files to `/tmp/packagesevil/` by exploiting the character-based prefix matching.\n\nThis vulnerability affects users who:\n- Install dbt packages from untrusted sources\n- Process tarball archives through dbt-common\u0027s extraction utilities\n\nThe practical risk is limited because:\n- Exploitation requires a malicious tarball to be processed\n- File writes are restricted to sibling directories with matching prefixes (not arbitrary paths)\n- Packages from trusted sources (dbt Hub) are not affected\n\nThis is similar to CVE-2026-1703 in pip, which had a CVSS score of 3.9 (Low).\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nFixed in `dbt-common` version 1.37.3 \u0026 1.34.2, and patched for dbt-core 1.11.7 and 1.10.20 releases.\n\nThe fix replaces `os.path.commonprefix()` with `os.path.commonpath()`, which correctly compares paths by their components rather than characters.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n- Only install dbt packages from trusted sources (official dbt Hub, verified git repositories)\n- Avoid installing packages from untrusted URLs or unverified third parties\n- Review package contents before installation when sourcing from external locations\n\n### Resources\n_Are there any links users can visit to find out more?_\n\n1. CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027): https://cwe.mitre.org/data/definitions/22.html\n2. CVE-2026-1703 (similar vulnerability in pip): https://nvd.nist.gov/vuln/detail/CVE-2026-1703\n3. pip fix PR #13777: https://github.com/pypa/pip/pull/13777\n4. Python documentation on `commonpath` vs `commonprefix`: https://docs.python.org/3/library/os.path.html#os.path.commonpath",
  "id": "GHSA-w75w-9qv4-j5xj",
  "modified": "2026-03-06T22:51:40Z",
  "published": "2026-03-05T00:59:10Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/dbt-labs/dbt-common/security/advisories/GHSA-w75w-9qv4-j5xj"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-29790"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pypa/pip/pull/13777"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dbt-labs/dbt-common/commit/e547954a48bac9394ef6eb98432e429dce9a7709"
    },
    {
      "type": "WEB",
      "url": "https://docs.python.org/3/library/os.path.html#os.path.commonpath"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-6vgw-5pg2-w6jp"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/dbt-labs/dbt-common"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "dbt-common\u0027s commonprefix() doesn\u0027t protect against path traversal"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…