CVE-2026-29790
JSON

2.0low

dbt-common: commonprefix() doesn't protect against path traversal

Severity
2.0low CVSS:4.0 by GitHub_M
Exploit likelihood
0.31% (higher than 26% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-w75w-9qv4-j5xjPYSEC-2026-2440

Description

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.

Affected

Product or packageVersionsReported by
dbt-labs dbt-common< 1.37.3, < 1.34.2CVE List
dbt-common (PyPI)before 1.34.2, from 1.35.0 before 1.37.3GitHub Advisory Database, PyPA Advisory Database
getdbt dbt-commonbefore 1.34.2, from 1.35.0 before 1.37.3NVD

All scores

GitHub_M2.0low CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
GitHublow CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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
NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-29790 changed 2026-03-09CVE Terms of Use
GitHub Advisory DatabaseGHSA-w75w-9qv4-j5xj changed 2026-09-10CC-BY-4.0
NVDCVE-2026-29790 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-2440 changed 2026-07-13CC-BY-4.0