CVE-2024-40647 — sentry-sdk is the official Python SDK for Sentry
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
Published
2024-07-18T16:51:23.539Z
Last modified
2024-08-02T04:33:11.814Z
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N
01What is this vulnerability?
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`…
02Affected products
| Vendor | Product | Versions |
|---|
| getsentry | sentry | python — < 2.8.0 |
03Active exploitation status
Not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog. EPSS is the best forward-looking signal — see the EPSS row above.
04Recommended remediation
- Patch to a fixed version listed in the vendor advisory (see references below).
- Mitigate with WAF rules, network egress filters, or feature flags where the patch is not yet available.
- Hunt historical logs for exploitation indicators — see Detection signatures below.
05Technical details
For the full vendor write-up, exploit chains, and reference implementations, see the references list in section 09.
06Detection signatures
Open the Sigma generator with a pre-filled prompt for this CVE to draft a starting detection in your stack of choice:
Open in Sigma generator →
07Related CVEs
No directly-cited follow-up CVEs in the KB record for this advisory. The references list in section 09 carries the vendor cross-references.
08Timeline
- Published: 2024-07-18T16:51:23.539Z
- Last modified: 2024-08-02T04:33:11.814Z
09References
- github.com — https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64…
- github.com — https://github.com/getsentry/sentry-python/pull/3251
- github.com — https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f33…
- docs.python.org — https://docs.python.org/3/library/subprocess.html
- docs.sentry.io — https://docs.sentry.io/platforms/python/integrations/default-integrations
- docs.sentry.io — https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdli…
- github.com — https://github.com/getsentry/sentry-python/releases/tag/2.8.0
Want this in your SOAR or SIEM?
SARA's API returns EPSS, CVSS, KEV, and an analyst-grade summary in one call.
Read the API reference →