{"cve":"CVE-2024-40647","nvd":{"published":"2024-07-18T17:15:05.193","modified":"2026-06-17T07:46:14.173","status":"Deferred","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","score":5.3},"cwes":["CWE-200"],"references":["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"],"products":[],"source":"nvd","synced_at":"2026-10-19T21:52:42.518321223+00:00"},"epss":{"cve":"CVE-2024-40647","score":0.002,"percentile":0.09826,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-g92j-qhmh-64v2","url":"https://osv.dev/vulnerability/GHSA-g92j-qhmh-64v2","summary":"Sentry's Python SDK unintentionally exposes environment variables to subprocesses","modified":"2026-07-07T17:56:58.426287284Z","packages":[{"ecosystem":"PyPI","name":"sentry-sdk","purl":"pkg:pypi/sentry-sdk","ranges":[">=2.0.0a1 <2.8.0"],"fixed":["2.8.0"]},{"ecosystem":"PyPI","name":"sentry-sdk","purl":"pkg:pypi/sentry-sdk","ranges":["<1.45.1"],"fixed":["1.45.1"]}]},{"id":"PYSEC-2026-1917","url":"https://osv.dev/vulnerability/PYSEC-2026-1917","summary":"Sentry's Python SDK unintentionally exposes environment variables to subprocesses","modified":"2026-07-07T17:47:52.959930142Z","packages":[{"ecosystem":"PyPI","name":"sentry-sdk","purl":"pkg:pypi/sentry-sdk","ranges":["<1.45.1",">=2.0.0a1 <2.8.0"],"fixed":["1.45.1","2.8.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}