Executive brief
Apache BuildStream is a build automation system used to construct and manage software builds. A flaw in the tar source plugin allows malicious tarballs to write files anywhere on the host system with the privileges of the user running BuildStream when Python versions below 3.12 are used. An attacker could use this to compromise the build environment or inject malicious code into build artifacts.
Technical details
The tar source plugin in BuildStream does not properly validate symlinks when extracting tarball sources, allowing directory traversal and arbitrary file write. The vulnerability only affects Python < 3.12; Python 3.12+ includes tarfile filter functionality that blocks such escapes. The attack requires a malicious tarball to be fetched during the build process, which can be mitigated by only using trusted sources and verifying tracked sources via SHA256 hash.
Affected products
- Apache BuildStream < 2.8.1 when running on Python < 3.12
Timeline
- 2026-09-23: disclosed