---
id: CVE-2026-82331
title: >-
  Improper link resolution before file access ('link following') vulnerability
  in the `tar` source plugin of Apache BuildStream running on Python < 3.12
  allows malicious source tarballs to write files on the host, with the
  privileges of th…
summary: >-
  Improper link resolution before file access ('link following') vulnerability
  in the `tar` source plugin of Apache BuildStream running on Python < 3.12
  allows malicious source tarballs to write files on the host, with the
  privileges of th…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-59
vendor: Apache Software Foundation
product: buildstream
affected:
  - buildstream <= 2.8.0
published: '2026-09-23'
updated: '2026-09-23'
sourceUpdated: '2026-09-23T17:58:26.570'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-82331'
references:
  - url: 'https://lists.apache.org/thread/9b342631x7bvtyg0pq7zgywtl2cmy34v'
    label: security@apache.org
  - url: 'http://www.openwall.com/lists/oss-security/2026/09/23/9'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
  - cve.org
epss: 0.00424
epssPercentile: 0.34089
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-09-23T14:55:37.367789Z'
ingestedAt: '2026-09-23T07:19:31.669Z'
---

## Overview

Improper link resolution before file access ('link following') vulnerability in the `tar` source plugin of Apache BuildStream running on Python < 3.12 allows malicious source tarballs to write files on the host, with the privileges of the user running BuildStream, via symlinks as part of source fetching.
The impact of this issue is mitigated by:

* BuildStream projects should only use trusted sources in their elements as otherwise the build output can also not be trusted
* Tracking a source tarball pins its SHA256 hash, which prevents MITM attacks of users that are fetching an already tracked project
* When running on Python >= 3.12, BuildStream >= 2.3.0 already makes use of the Python `tarfile` filter functionality, which blocks the symlink escape

Users are recommended to upgrade to version 2.8.1, which fixes this issue.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
