# CVE-2024-40647: sentry-python: sentry-sdk is the official Python SDK for Sentry.io

CVE-2024-40647 is fixed in sentry-python on 1 platform, first by DEBIAN-CVE-2024-40647, released July 18, 2024. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2024-40647
- Priority: Routine
- CVSS: 5.3 (medium)
- EPSS: 0.0020
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jul 18, 2024

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | sentry-python Debian 12.15 (bookworm) | 1.9.10-2+deb12u1 | [DEBIAN-CVE-2024-40647](https://patchblox.com/security/data/fix/linux/debian-cve-2024-40647.md) | Jul 18, 2024 |
| Linux | sentry-python Debian 13.5 (trixie) | 2.16.0-1 | [DEBIAN-CVE-2024-40647](https://patchblox.com/security/data/fix/linux/debian-cve-2024-40647.md) | Jul 18, 2024 |
| Linux | sentry-python Debian 14 | 2.16.0-1 | [DEBIAN-CVE-2024-40647](https://patchblox.com/security/data/fix/linux/debian-cve-2024-40647.md) | Jul 18, 2024 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
