CVE-2026-29790: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in dbt-labs dbt-common
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.
AI Analysis
Technical Summary
The vulnerability identified as CVE-2026-29790 affects dbt-labs' dbt-common, a shared utility library used by dbt-core and its adapters. The issue arises in the safe_extract() function responsible for extracting tarball archives safely by ensuring extracted files remain within a designated directory. The function uses Python's os.path.commonprefix() to validate paths, but this method compares strings character-by-character rather than by directory components. This flawed validation allows a maliciously crafted tarball to include file paths that appear to be within the extraction directory by prefix but actually traverse outside it, enabling path traversal attacks. For example, a file path like 'target_dir/../evil_file' could bypass the check if the common prefix matches, allowing files to be written outside the intended directory. This can lead to overwriting or creating files in arbitrary locations accessible by the user running the extraction, potentially compromising data integrity or enabling further attacks such as local privilege escalation. The vulnerability affects dbt-common versions prior to 1.34.2 and 1.37.3, where the patch replaces the unsafe commonprefix() check with a more robust path validation method that correctly handles directory components. Exploitation requires an attacker to supply a malicious tarball and for a user to extract it using the vulnerable function, implying user interaction and limited privileges. No public exploits have been reported to date. The CVSS 4.0 base score is 2.0, indicating low severity due to the limited scope and complexity of exploitation. Nonetheless, the vulnerability highlights the risks of improper path validation in archive extraction routines and the importance of using secure path normalization techniques.
Potential Impact
The primary impact of this vulnerability is the potential for an attacker to write or overwrite files outside the intended extraction directory, which can compromise data integrity and potentially affect system stability or security. While the attacker requires user interaction and limited privileges, successful exploitation could lead to local file manipulation, which might be leveraged for further attacks such as privilege escalation or persistence mechanisms if sensitive files are overwritten. Organizations relying on dbt-common for data transformation workflows could face disruption or data corruption if malicious tarballs are introduced, especially in environments where users extract archives from untrusted sources. However, the low CVSS score and absence of known exploits suggest the immediate risk is limited. Still, in high-security or regulated environments, even low-severity path traversal vulnerabilities warrant prompt remediation to prevent potential lateral movement or supply chain compromise. The impact is more pronounced in organizations with automated or semi-automated workflows that process external tarball inputs without strict validation.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade dbt-common to versions 1.34.2 or 1.37.3 or later, where the safe_extract() function has been corrected to properly validate extraction paths. Until upgrades are applied, users should avoid extracting tarball archives from untrusted or unauthenticated sources using vulnerable versions. Implement additional validation layers by manually inspecting archive contents before extraction or using alternative extraction tools that enforce strict path normalization and sandboxing. Employ runtime monitoring to detect unexpected file writes outside designated directories during extraction processes. Incorporate security training to raise awareness about the risks of extracting archives from unknown origins. For environments with automated pipelines, enforce strict input validation and sandbox extraction operations to contain potential path traversal attempts. Regularly audit and review third-party dependencies for updates and security patches to reduce exposure to similar vulnerabilities.
Affected Countries
United States, Canada, United Kingdom, Germany, France, Australia, Netherlands, Japan, South Korea, India
CVE-2026-29790: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in dbt-labs dbt-common
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.
AI-Powered Analysis
Technical Analysis
The vulnerability identified as CVE-2026-29790 affects dbt-labs' dbt-common, a shared utility library used by dbt-core and its adapters. The issue arises in the safe_extract() function responsible for extracting tarball archives safely by ensuring extracted files remain within a designated directory. The function uses Python's os.path.commonprefix() to validate paths, but this method compares strings character-by-character rather than by directory components. This flawed validation allows a maliciously crafted tarball to include file paths that appear to be within the extraction directory by prefix but actually traverse outside it, enabling path traversal attacks. For example, a file path like 'target_dir/../evil_file' could bypass the check if the common prefix matches, allowing files to be written outside the intended directory. This can lead to overwriting or creating files in arbitrary locations accessible by the user running the extraction, potentially compromising data integrity or enabling further attacks such as local privilege escalation. The vulnerability affects dbt-common versions prior to 1.34.2 and 1.37.3, where the patch replaces the unsafe commonprefix() check with a more robust path validation method that correctly handles directory components. Exploitation requires an attacker to supply a malicious tarball and for a user to extract it using the vulnerable function, implying user interaction and limited privileges. No public exploits have been reported to date. The CVSS 4.0 base score is 2.0, indicating low severity due to the limited scope and complexity of exploitation. Nonetheless, the vulnerability highlights the risks of improper path validation in archive extraction routines and the importance of using secure path normalization techniques.
Potential Impact
The primary impact of this vulnerability is the potential for an attacker to write or overwrite files outside the intended extraction directory, which can compromise data integrity and potentially affect system stability or security. While the attacker requires user interaction and limited privileges, successful exploitation could lead to local file manipulation, which might be leveraged for further attacks such as privilege escalation or persistence mechanisms if sensitive files are overwritten. Organizations relying on dbt-common for data transformation workflows could face disruption or data corruption if malicious tarballs are introduced, especially in environments where users extract archives from untrusted sources. However, the low CVSS score and absence of known exploits suggest the immediate risk is limited. Still, in high-security or regulated environments, even low-severity path traversal vulnerabilities warrant prompt remediation to prevent potential lateral movement or supply chain compromise. The impact is more pronounced in organizations with automated or semi-automated workflows that process external tarball inputs without strict validation.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade dbt-common to versions 1.34.2 or 1.37.3 or later, where the safe_extract() function has been corrected to properly validate extraction paths. Until upgrades are applied, users should avoid extracting tarball archives from untrusted or unauthenticated sources using vulnerable versions. Implement additional validation layers by manually inspecting archive contents before extraction or using alternative extraction tools that enforce strict path normalization and sandboxing. Employ runtime monitoring to detect unexpected file writes outside designated directories during extraction processes. Incorporate security training to raise awareness about the risks of extracting archives from unknown origins. For environments with automated pipelines, enforce strict input validation and sandbox extraction operations to contain potential path traversal attempts. Regularly audit and review third-party dependencies for updates and security patches to reduce exposure to similar vulnerabilities.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-04T16:26:02.900Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69ab4093c48b3f10ffd6ce06
Added to database: 3/6/2026, 9:01:07 PM
Last enriched: 3/6/2026, 9:16:18 PM
Last updated: 3/6/2026, 11:33:52 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.