ADVISORIES

Vulnerability

CVE-2024-40647

sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK < 2.8.0 allows the environment variables to be passed to subprocesses despite the `env={}` setting. In Python's `subprocess` calls, all environment variables are passed to subprocesses by default. However, if you specifically do not want them to be passed to subprocesses, you may use `env` argument in `subprocess` calls. Due to the bug in Sentry SDK, with the Stdlib integration enabled (which is enabled by default), this expectation is not fulfilled, and all environment variables are being passed to subprocesses instead. The issue has been patched in pull request #3251 and is included in sentry-sdk==2.8.0. We strongly recommend upgrading to the latest SDK version. However, if it's not possible, and if passing environment variables to child processes poses a security risk for you, you can disable all default integrations.

8 advisories report this vulnerability, across 5 ecosystems.

Advisories

  • DEBIAN-CVE-2024-40647

    sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK < 2.8.0 allows the environment variables to be passed to subprocesses despite the `env={}` setting. In Python's `subprocess` calls, all…

    CVE-2024-40647 Debian Updated 2 November 2026
  • DLA-4612-1

    sentry-python - security update

    CVE-2024-40647 Debian Updated 20 November 2026
  • GHSA-g92j-qhmh-64v2

    Sentry's Python SDK unintentionally exposes environment variables to subprocesses

    Low CVE-2024-40647 PyPI Updated 7 July 2026
  • PYSEC-2026-1917

    Sentry's Python SDK unintentionally exposes environment variables to subprocesses

    CVE-2024-40647 PyPI Updated 7 July 2026
  • UBUNTU-CVE-2024-40647

    sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK < 2.8.0 allows the environment variables to be passed to subprocesses despite the `env={}` setting. In Python's `subprocess` calls, all…

    CVE-2024-40647 Ubuntu Updated 17 October 2026
  • openSUSE-SU-2024:0214-1

    Security update for python-sentry-sdk

    CVE-2024-40647 SUSEopenSUSE Updated 4 February 2026
  • openSUSE-SU-2024:14209-1

    python310-sentry-sdk-2.10.0-1.1 on GA media

    CVE-2024-40647 openSUSE Updated 4 February 2026
  • openSUSE-SU-2026:11425-1

    python313-sentry-sdk-2.66.1-1.1 on GA media

    CVE-2024-40647 openSUSE Updated 2 August 2026

References