Impact
A flaw in the tar source plugin of Apache BuildStream when executed with Python versions older than 3.12 allows an attacker who can supply a malformed tar archive to cause the program to follow symlink paths located outside the intended extraction directory. The plugin then writes data to those paths using the privileges of the user running BuildStream, which can overwrite build artifacts or inject malicious files. This vulnerability is classified as CWE-59 and can compromise the integrity of the build output.
Affected Systems
The issue exists in Apache BuildStream prior to 2.8.1 when running on Python 3.11 or lower. BuildStream versions 2.3.0 and later on Python 3.12 or newer provide native protection via the tarfile filter functionality. The affected product is Apache Software Foundation: Apache BuildStream; the fix is delivered in BuildStream 2.8.1 and higher.
Risk and Exploitability
The CVSS score of 9.8 indicates very high severity, and the vulnerability enables arbitrary file writes. Exploitation requires that an attacker can supply a source tarball to BuildStream, which is likely in continuous integration or deployment pipelines that use untrusted source inputs. The EPSS score is < 1% and the vulnerability is not listed in the CISA KEV catalog. Attackers would target BuildStream runs that process unverified tar archives, potentially modifying artifacts or inserting malicious content.
OpenCVE Enrichment