{"id":"CVE-2026-29790","aliases":["CVE-2026-29790","GHSA-w75w-9qv4-j5xj","PYSEC-2026-2440"],"related":[],"kind":"vulnerability","state":"published","title":"dbt-common: commonprefix() doesn't protect against path traversal","summary":"dbt-common is the shared common utilities for dbt-core and adapter implementations use. Prior to versions 1.34.2 and 1.37.3, 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. This issue has been patched in versions 1.34.2 and 1.37.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"dbt-common is the shared common utilities for dbt-core and adapter implementations use. Prior to versions 1.34.2 and 1.37.3, 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. This issue has been patched in versions 1.34.2 and 1.37.3.","source":"cvelist"},{"lang":"en","text":"### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nA 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.\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's 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 & 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 ('Path Traversal'): 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"dbt-common son las utilidades comunes compartidas que utilizan las implementaciones de dbt-core y adaptadores. Antes de las versiones 1.34.2 y 1.37.3, una vulnerabilidad de salto de ruta existe en la función safe_extract() de dbt-common utilizada al extraer archivos tarball. La función usa os.path.commonprefix() para validar que los archivos extraídos permanezcan dentro del directorio de destino previsto. Sin embargo, commonprefix() compara rutas carácter por carácter en lugar de por componentes de ruta, permitiendo que un tarball malicioso escriba archivos en directorios hermanos con prefijos de nombre coincidentes. Este problema ha sido parcheado en las versiones 1.34.2 y 1.37.3.","source":"nvd"}],"published":"2026-03-05T00:59:10.000Z","modified":"2026-09-10T03:50:41.434Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":2,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":2,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 1.37.3","status":"affected"},{"version":"< 1.34.2","status":"affected"}],"vendor":"dbt-labs","product":"dbt-common","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.34.2"}],"ecosystem":"PyPI","package":"dbt-common","purl":"pkg:pypi/dbt-common","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.35.0","status":"affected","fixed":"1.37.3"}],"ecosystem":"PyPI","package":"dbt-common","purl":"pkg:pypi/dbt-common","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.34.2"},{"status":"affected","introduced":"1.35.0","fixed":"1.37.3"}],"vendor":"getdbt","product":"dbt-common","cpe":"cpe:2.3:a:getdbt:dbt-common:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.34.2"},{"type":"ecosystem","introduced":"1.35.0","status":"affected","fixed":"1.37.3"}],"ecosystem":"PyPI","package":"dbt-common","purl":"pkg:pypi/dbt-common","source":"pysec"}],"references":[{"url":"https://github.com/dbt-labs/dbt-common/security/advisories/GHSA-w75w-9qv4-j5xj","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pypa/pip/pull/13777","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/dbt-labs/dbt-common/commit/e547954a48bac9394ef6eb98432e429dce9a7709","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-29790","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://docs.python.org/3/library/os.path.html#os.path.commonpath","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-6vgw-5pg2-w6jp","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/dbt-labs/dbt-common","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/dbt-common","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-w75w-9qv4-j5xj","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-03-09T20:50:37.998Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-29790","url":"https://www.cve.org/CVERecord?id=CVE-2026-29790","licence":"CVE Terms of Use","modified":"2026-03-09T20:54:30.453Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w75w-9qv4-j5xj","url":"https://github.com/advisories/GHSA-w75w-9qv4-j5xj","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:41.434Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-29790","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-29790","licence":"Public domain","modified":"2026-06-17T10:29:53.530Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2440","url":"https://osv.dev/vulnerability/PYSEC-2026-2440","licence":"CC-BY-4.0","modified":"2026-07-13T16:31:42.929Z"}],"updatedAt":"2026-11-25T22:59:15.421Z","epss":{"score":0.00313,"percentile":0.26173,"date":"2026-12-01T12:00:22.000Z"}}