CVE-2024-40647Unintentional exposure of environment variables to subprocesses in sentry-sdk
- 5.3MediumCVSS base score
- 0.20%Exploitation in 30 daysEPSS · top 90% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 10 days later
· 10 days later
Published
- 23 months later
· 23 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.3 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N |
| NVDNVD · Deferred | 3.1 | Medium5.3 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.20% · top 90% of all CVEs (15 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.3.
Affected products
- affected < 2.8.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIsentry-sdkGHSA-g92j-qhmh-64v2 (opens in a new tab)
References
References8
- https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/getsentry/sentry-python/pull/3251 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff (opens in a new tab)x_refsource_MISCx_transferred
- https://docs.python.org/3/library/subprocess.html (opens in a new tab)x_refsource_MISCx_transferred
- https://docs.sentry.io/platforms/python/integrations/default-integrations (opens in a new tab)x_refsource_MISCx_transferred
- https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/getsentry/sentry-python/releases/tag/2.8.0 (opens in a new tab)x_refsource_MISCx_transferred
- https://lists.debian.org/debian-lts-announce/2026/06/msg00001.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-2345 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-g92j-qhmh-64v2 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-40647)Record last updated .