Home / getsentry / sentry-python / CVE-2024-40647
CVE-2024-40647: is it exploited, and which versions of getsentry sentry-python are affected and fixed?
CVE-2024-40647 is an information disclosure vulnerability in getsentry sentry-python. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 13:38 UTC). Affected: sentry-sdk from 2.0.0a1 before 2.8.0 and sentry-sdk before 1.45.1 (GitHub advisory GHSA-g92j-qhmh-64v2). Fixed in 2.8.0 and 1.45.1 (GitHub advisory GHSA-g92j-qhmh-64v2). Severity: Medium (5.3, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 13:38 UTC, CVE record November 19, 2026, 07:11 UTC and NVD November 19, 2026, 07:28 UTC.
What is CVE-2024-40647?
Unintentional exposure of environment variables to subprocesses in sentry-sdk
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.
From the CVE record by GitHub_M, last updated June 1, 2026, 05:37 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| getsentry | sentry-python | < 2.8.0 |
As the CVE record by GitHub_M states it, last updated June 1, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | sentry-sdk | >= 2.0.0a1, < 2.8.0 | 2.8.0 | GHSA-g92j-qhmh-64v2 |
| PyPI | sentry-sdk | < 1.45.1 | 1.45.1 | GHSA-g92j-qhmh-64v2 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated June 1, 2026. Summary: Sentry's Python SDK unintentionally exposes environment variables to subprocesses.
How severe is CVE-2024-40647?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 5.3 | CVSS 3.1 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N | GitHub_M |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-40647 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: partial (CISA ADP, July 18, 2024)
- EPSS
- 0.20% probability of exploitation activity in the next 30 days, percentile 10.3 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Where are the vendor advisories and references?
- https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2 x_refsource_CONFIRM
- https://github.com/getsentry/sentry-python/pull/3251 x_refsource_MISC
- https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff x_refsource_MISC
- https://docs.python.org/3/library/subprocess.html x_refsource_MISC
- https://docs.sentry.io/platforms/python/integrations/default-integrations x_refsource_MISC
- https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib x_refsource_MISC
- https://github.com/getsentry/sentry-python/releases/tag/2.8.0 x_refsource_MISC
- https://lists.debian.org/debian-lts-announce/2026/06/msg00001.html
When was it published, and where is the official record?
- Reserved
- July 8, 2024
- Published
- July 18, 2024, 16:51 UTC
- CVE record updated
- June 1, 2026, 05:37 UTC by GitHub_M
- NVD
- Deferred, last modified June 17, 2026, 07:46 UTC
- Last checked
- CVE list November 19, 2026, 07:11 UTC; NVD November 19, 2026, 07:28 UTC; KEV December 3, 2026, 13:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect sentry-python?
- Mar 22, 2023CVE-2023-28117 getsentry sentry-python: information disclosure in sent data
Questions about CVE-2024-40647
Is CVE-2024-40647 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 13:38 UTC. FIRST's EPSS gives it a 0.20% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of getsentry sentry-python are affected by CVE-2024-40647?
sentry-sdk from 2.0.0a1 before 2.8.0 and sentry-sdk before 1.45.1, per the GitHub advisory GHSA-g92j-qhmh-64v2. The tables above give every range the sources list.
Which version fixes CVE-2024-40647?
2.8.0 and 1.45.1, per the GitHub advisory GHSA-g92j-qhmh-64v2. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-40647?
Medium (5.3, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2024-40647?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.