CVE-2024-40647
published medium CVSS 3.1 · 5.3Unintentional exposure of environment variables to subprocesses in sentry-sdk
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| getsentry | — | sentry-python< 2.8.0 | Affected | Not stated | GitHub_M |
| Debian | bullseye | sentry-python | Advisory build | 0.13.2-1+deb11u1 | DLA-4612-1 |
| SUSE / openSUSE | openSUSE-Leap-15.5 | python3-sentry-sdknoarch | Advisory build | 0.14.4-bp155.3.3.1 | OPENSUSE-SU-2024:0214-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-sentry-sdkaarch64 | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-sentry-sdkppc64le | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-sentry-sdks390x | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-sentry-sdkx86_64 | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-sentry-sdkaarch64 | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
Show 15 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-sentry-sdkppc64le | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-sentry-sdks390x | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-sentry-sdkx86_64 | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-sentry-sdkaarch64 | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-sentry-sdkppc64le | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-sentry-sdks390x | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-sentry-sdkx86_64 | Advisory build | 2.10.0-1.1 | OPENSUSE-SU-2024:14209-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sentry-sdkaarch64 | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sentry-sdkppc64le | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sentry-sdks390x | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sentry-sdkx86_64 | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sentry-sdkaarch64 | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sentry-sdkppc64le | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sentry-sdks390x | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sentry-sdkx86_64 | Advisory build | 2.66.1-1.1 | OPENSUSE-SU-2026:11425-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| getsentry | sentry-python | < 2.8.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-200 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
References
8- https://docs.python.org/3/library/subprocess.html
- https://docs.sentry.io/platforms/python/integrations/default-integrations
- https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib
- https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff
- https://github.com/getsentry/sentry-python/pull/3251
- https://github.com/getsentry/sentry-python/releases/tag/2.8.0
- https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2
- https://lists.debian.org/debian-lts-announce/2026/06/msg00001.html
Provider assertions
3GitHub_M · cna
Unintentional exposure of environment variables to subprocesses in sentry-sdk
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- dcb2fefebfb5aaf7cdd2828f6a279e3d64aed5f0b691b882ed942aa27345e45c
- Ingested
- 23 Sep 2026, 08:26:02 UTC
- Source record
- Official CVE record