{"id":"CVE-2024-40647","aliases":["DEBIAN-CVE-2024-40647","EUVD-2024-2345","GHSA-g92j-qhmh-64v2","PYSEC-2026-1917","UBUNTU-CVE-2024-40647","openSUSE-SU-2024:0214-1","openSUSE-SU-2024:14209-1","openSUSE-SU-2026:11425-1"],"status":"published","title":"Unintentional exposure of environment variables to subprocesses in sentry-sdk","description":"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK \u003c 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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.002,"percentile":0.0984,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-200"],"published":"2024-07-18T16:51:23Z","modified":"2026-11-02T12:02:37Z","fixes":[{"ecosystem":"PyPI","package":"sentry-sdk","fixed_in":["2.8.0","1.45.1"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"sentry-python","fixed_in":["1.9.10-2+deb12u1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"sentry-python","fixed_in":["2.16.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"sentry-python","fixed_in":["2.16.0-1"],"sources":["osv"]},{"ecosystem":"SUSE:Package Hub 15 SP5","package":"python-sentry-sdk","fixed_in":["0.14.4-bp155.3.3.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Leap 15.5","package":"python-sentry-sdk","fixed_in":["0.14.4-bp155.3.3.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-sentry-sdk","fixed_in":["2.10.0-1.1","2.66.1-1.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0a1"},{"fixed":"2.8.0"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.45.1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.10-2+deb12u1"}]}],"versions":["1.9.10-2"]},{"source":"osv","ecosystem":"Debian:13","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.16.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.16.0-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0a1"},{"fixed":"2.8.0"}]}],"versions":["2.0.0","2.0.0a1","2.0.0a2","2.0.0rc1","2.0.0rc2","2.0.0rc3","2.0.0rc4","2.0.0rc5","2.0.0rc6","2.0.1","2.1.0","2.1.1","2.2.0","2.2.1","2.3.0","2.3.1","2.4.0","2.5.0","2.5.1","2.6.0","2.7.0","2.7.1"]},{"source":"osv","ecosystem":"PyPI","package":"sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.45.1"}]}],"versions":["0.1.0","0.1.0rc1","0.1.0rc10","0.1.0rc11","0.1.0rc12","0.1.0rc13","0.1.0rc14","0.1.0rc15","0.1.0rc16","0.1.0rc2","0.1.0rc3","0.1.0rc4","0.1.0rc5","0.1.0rc6","0.1.0rc7","0.1.0rc8","0.1.0rc9","0.1.1","0.1.2","0.1.3","0.10.0","0.10.1","0.10.2","0.11.0","0.11.1","0.11.2","0.12.0","0.12.1","0.12.2","0.12.3","0.13.0","0.13.1","0.13.2","0.13.3","0.13.4","0.13.5","0.14.0","0.14.1","0.14.2","0.14.3","0.14.4","0.15.0","0.15.1","0.16.0","0.16.1","0.16.2","0.16.3","0.16.4","0.16.5","0.17.0","0.17.1","0.17.2","0.17.3","0.17.4","0.17.5","0.17.6","0.17.7","0.17.8","0.18.0","0.19.0","0.19.1","0.19.2","0.19.3","0.19.4","0.19.5","0.2.1","0.2.2","0.20.0","0.20.1","0.20.2","0.20.3","0.3.0","0.3.1","0.3.10","0.3.11","0.3.2","0.3.3","0.3.4","0.3.5","0.3.6","0.3.7","0.3.8","0.3.9","0.4.0","0.4.1","0.4.2","0.4.3","0.5.0","0.5.1","0.5.2","0.5.3","0.5.4","0.5.5","0.6.0","0.6.1","0.6.2","0.6.3","0.6.4","0.6.5","0.6.6","0.6.7","0.6.8","0.6.9","0.7.0","0.7.1","0.7.10","0.7.11","0.7.12","0.7.13","0.7.14","0.7.2","0.7.3","0.7.4","0.7.5","0.7.6","0.7.7","0.7.8","0.7.9","0.8.0","0.8.1","0.9.0","0.9.1","0.9.2","0.9.3","0.9.4","0.9.5","1.0.0","1.1.0","1.10.0","1.10.1","1.11.0","1.11.1","1.12.0","1.12.1","1.13.0","1.14.0","1.15.0","1.16.0","1.17.0","1.18.0","1.19.0","1.19.1","1.2.0","1.20.0","1.21.0","1.21.1","1.22.0","1.22.1","1.22.2","1.23.0","1.23.1","1.24.0","1.25.0","1.25.1","1.26.0","1.27.0","1.27.1","1.28.0","1.28.1","1.29.0","1.29.1","1.29.2","1.3.0","1.3.1","1.30.0","1.31.0","1.32.0","1.33.0","1.33.1","1.34.0","1.35.0","1.36.0","1.37.0","1.37.1","1.38.0","1.39.0","1.39.1","1.39.2","1.4.0","1.4.1","1.4.2","1.4.3","1.40.0","1.40.1","1.40.2","1.40.3","1.40.4","1.40.5","1.40.6","1.41.0","1.42.0","1.43.0","1.44.0","1.44.1","1.45.0","1.5.0","1.5.1","1.5.10","1.5.11","1.5.12","1.5.2","1.5.3","1.5.4","1.5.5","1.5.6","1.5.7","1.5.8","1.5.9","1.6.0","1.7.0","1.7.1","1.7.2","1.8.0","1.9.0","1.9.1","1.9.10","1.9.2","1.9.3","1.9.4","1.9.5","1.9.6","1.9.7","1.9.8","1.9.9"]},{"source":"osv","ecosystem":"PyPI","package":"sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.45.1"},{"introduced":"2.0.0a1"},{"fixed":"2.8.0"}]}],"versions":["0.1.0","0.1.0rc1","0.1.0rc10","0.1.0rc11","0.1.0rc12","0.1.0rc13","0.1.0rc14","0.1.0rc15","0.1.0rc16","0.1.0rc2","0.1.0rc3","0.1.0rc4","0.1.0rc5","0.1.0rc6","0.1.0rc7","0.1.0rc8","0.1.0rc9","0.1.1","0.1.2","0.1.3","0.10.0","0.10.1","0.10.2","0.11.0","0.11.1","0.11.2","0.12.0","0.12.1","0.12.2","0.12.3","0.13.0","0.13.1","0.13.2","0.13.3","0.13.4","0.13.5","0.14.0","0.14.1","0.14.2","0.14.3","0.14.4","0.15.0","0.15.1","0.16.0","0.16.1","0.16.2","0.16.3","0.16.4","0.16.5","0.17.0","0.17.1","0.17.2","0.17.3","0.17.4","0.17.5","0.17.6","0.17.7","0.17.8","0.18.0","0.19.0","0.19.1","0.19.2","0.19.3","0.19.4","0.19.5","0.2.1","0.2.2","0.20.0","0.20.1","0.20.2","0.20.3","0.3.0","0.3.1","0.3.10","0.3.11","0.3.2","0.3.3","0.3.4","0.3.5","0.3.6","0.3.7","0.3.8","0.3.9","0.4.0","0.4.1","0.4.2","0.4.3","0.5.0","0.5.1","0.5.2","0.5.3","0.5.4","0.5.5","0.6.0","0.6.1","0.6.2","0.6.3","0.6.4","0.6.5","0.6.6","0.6.7","0.6.8","0.6.9","0.7.0","0.7.1","0.7.10","0.7.11","0.7.12","0.7.13","0.7.14","0.7.2","0.7.3","0.7.4","0.7.5","0.7.6","0.7.7","0.7.8","0.7.9","0.8.0","0.8.1","0.9.0","0.9.1","0.9.2","0.9.3","0.9.4","0.9.5","1.0.0","1.1.0","1.10.0","1.10.1","1.11.0","1.11.1","1.12.0","1.12.1","1.13.0","1.14.0","1.15.0","1.16.0","1.17.0","1.18.0","1.19.0","1.19.1","1.2.0","1.20.0","1.21.0","1.21.1","1.22.0","1.22.1","1.22.2","1.23.0","1.23.1","1.24.0","1.25.0","1.25.1","1.26.0","1.27.0","1.27.1","1.28.0","1.28.1","1.29.0","1.29.1","1.29.2","1.3.0","1.3.1","1.30.0","1.31.0","1.32.0","1.33.0","1.33.1","1.34.0","1.35.0","1.36.0","1.37.0","1.37.1","1.38.0","1.39.0","1.39.1","1.39.2","1.4.0","1.4.1","1.4.2","1.4.3","1.40.0","1.40.1","1.40.2","1.40.3","1.40.4","1.40.5","1.40.6","1.41.0","1.42.0","1.43.0","1.44.0","1.44.1","1.45.0","1.5.0","1.5.1","1.5.10","1.5.11","1.5.12","1.5.2","1.5.3","1.5.4","1.5.5","1.5.6","1.5.7","1.5.8","1.5.9","1.6.0","1.7.0","1.7.1","1.7.2","1.8.0","1.9.0","1.9.1","1.9.10","1.9.2","1.9.3","1.9.4","1.9.5","1.9.6","1.9.7","1.9.8","1.9.9","2.0.0","2.0.0a1","2.0.0a2","2.0.0rc1","2.0.0rc2","2.0.0rc3","2.0.0rc4","2.0.0rc5","2.0.0rc6","2.0.1","2.1.0","2.1.1","2.2.0","2.2.1","2.3.0","2.3.1","2.4.0","2.5.0","2.5.1","2.6.0","2.7.0","2.7.1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.12.2-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.13.2-1","1.4.3-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.10-2","1.39.2-0.1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.18.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.22.0-1","2.60.0-3","2.63.0-1","2.64.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"sentry-python","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.18.0-1","2.22.0-1"]},{"source":"osv","ecosystem":"SUSE:Package Hub 15 SP5","package":"python-sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.14.4-bp155.3.3.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Leap 15.5","package":"python-sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.14.4-bp155.3.3.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.0-1.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-sentry-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.66.1-1.1"}]}]}],"products":[{"vendor":"getsentry","product":"sentry-python"}],"references":[{"url":"https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2","tags":["x_refsource_CONFIRM","x_transferred","advisory","web","report"]},{"url":"https://github.com/getsentry/sentry-python/pull/3251","tags":["x_refsource_MISC","x_transferred","fix","web","report"]},{"url":"https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff","tags":["x_refsource_MISC","x_transferred","fix","web","report"]},{"url":"https://docs.python.org/3/library/subprocess.html","tags":["x_refsource_MISC","x_transferred","web","report"]},{"url":"https://docs.sentry.io/platforms/python/integrations/default-integrations","tags":["x_refsource_MISC","x_transferred","web","report"]},{"url":"https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib","tags":["x_refsource_MISC","x_transferred","web","report"]},{"url":"https://github.com/getsentry/sentry-python/releases/tag/2.8.0","tags":["x_refsource_MISC","x_transferred","web","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2026/06/msg00001.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40647","tags":["advisory"]},{"url":"https://github.com/getsentry/sentry-python/releases/tag/1.45.1","tags":["web"]},{"url":"https://github.com/advisories/GHSA-g92j-qhmh-64v2","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40647.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-40647","tags":["advisory"]},{"url":"https://github.com/getsentry/sentry-python","tags":["package"]},{"url":"https://pypi.org/project/sentry-sdk","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2024-40647","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-40647","tags":["report"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/J6DLLMQ4P74VFN7WOQ3UL2VM6BAM22WL/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1228128","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2024-40647","tags":["web"]},{"url":"","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2024-40647","title":"Unintentional exposure of environment variables to subprocesses in sentry-sdk","description":"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK \u003c 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.\n","status":"published","published":"2024-07-18T16:51:23.539Z","modified":"2026-06-01T05:37:14.536Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:34:06.811965Z"}],"euvd":[{"id":"EUVD-2024-2345","description":"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK \u003c 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.\n","status":"published","published":"2024-07-18T16:51:23Z","modified":"2026-06-01T05:37:14Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T18:20:59.105484Z"}],"ghsa":[{"id":"GHSA-g92j-qhmh-64v2","title":"Sentry's Python SDK unintentionally exposes environment variables to subprocesses","description":"### Impact\n\nThe bug in Sentry's Python SDK \u003c2.8.0 results in the unintentional exposure of environment variables to subprocesses despite the `env={}` setting.\n\n### Details\n\nIn 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, like in this example:\n\n```\n\u003e\u003e\u003e subprocess.check_output([\"env\"], env={\"TEST\":\"1\"})\nb'TEST=1\\n'\n```\n\nIf you'd want to not pass any variables, you can set an empty dict:\n\n```\n\u003e\u003e\u003e subprocess.check_output([\"env\"], env={})\nb''\n```\n\nHowever, the bug in Sentry SDK \u003c2.8.0 causes **all environment variables** to be passed to the subprocesses when `env={}` is set, unless the Sentry SDK's [Stdlib](https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib) integration is disabled. The Stdlib integration is enabled by default.\n\n### Patches\nThe issue has been patched in https://github.com/getsentry/sentry-python/pull/3251 and the fix released in [sentry-sdk==2.8.0](https://github.com/getsentry/sentry-python/releases/tag/2.8.0). The fix was also backported to [sentry-sdk==1.45.1](https://github.com/getsentry/sentry-python/releases/tag/1.45.1).\n\n### Workarounds\n\nWe 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, there are two options:\n\n1. In your application, replace `env={}` with the minimal dict `env={\"EMPTY_ENV\":\"1\"}` or similar.\n\nOR\n\n2. Disable Stdlib integration:\n```\nimport sentry_sdk\n\n# Should go before sentry_sdk.init\nsentry_sdk.integrations._DEFAULT_INTEGRATIONS.remove(\"sentry_sdk.integrations.stdlib.StdlibIntegration\")\n\nsentry_sdk.init(...)\n```\n\n### References\n* Sentry docs: [Default integrations](https://docs.sentry.io/platforms/python/integrations/default-integrations/)\n* Python docs: [subprocess module](https://docs.python.org/3/library/subprocess.html)\n* Patch https://github.com/getsentry/sentry-python/pull/3251","status":"published","published":"2024-07-18T17:18:46Z","modified":"2026-06-01T09:31:10Z","cvss":[{"version":"4.0","score":1.8,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N","level":"low"},{"version":"3.1","score":2.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N","level":"low"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:40:15.638885Z"}],"nvd":[{"id":"CVE-2024-40647","description":"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK \u003c 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.\n","status":"published","published":"2024-07-18T17:15:05.193Z","modified":"2026-06-17T07:46:14.173Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:10:13.413515Z"}],"osv":[{"id":"CVE-2024-40647","title":"Unintentional exposure of environment variables to subprocesses in sentry-sdk","description":"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK \u003c 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.\n","status":"published","published":"2024-07-18T16:51:23.539Z","modified":"2026-10-28T02:30:35.314087779Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T15:44:41.618074Z"},{"id":"DEBIAN-CVE-2024-40647","description":"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK \u003c 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.","status":"published","published":"2024-07-18T17:15:05.193Z","modified":"2026-11-02T12:02:37.911834642Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:43.156294Z"},{"id":"GHSA-g92j-qhmh-64v2","title":"Sentry's Python SDK unintentionally exposes environment variables to subprocesses","description":"### Impact\n\nThe bug in Sentry's Python SDK \u003c2.8.0 results in the unintentional exposure of environment variables to subprocesses despite the `env={}` setting.\n\n### Details\n\nIn 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, like in this example:\n\n```\n\u003e\u003e\u003e subprocess.check_output([\"env\"], env={\"TEST\":\"1\"})\nb'TEST=1\\n'\n```\n\nIf you'd want to not pass any variables, you can set an empty dict:\n\n```\n\u003e\u003e\u003e subprocess.check_output([\"env\"], env={})\nb''\n```\n\nHowever, the bug in Sentry SDK \u003c2.8.0 causes **all environment variables** to be passed to the subprocesses when `env={}` is set, unless the Sentry SDK's [Stdlib](https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib) integration is disabled. The Stdlib integration is enabled by default.\n\n### Patches\nThe issue has been patched in https://github.com/getsentry/sentry-python/pull/3251 and the fix released in [sentry-sdk==2.8.0](https://github.com/getsentry/sentry-python/releases/tag/2.8.0). The fix was also backported to [sentry-sdk==1.45.1](https://github.com/getsentry/sentry-python/releases/tag/1.45.1).\n\n### Workarounds\n\nWe 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, there are two options:\n\n1. In your application, replace `env={}` with the minimal dict `env={\"EMPTY_ENV\":\"1\"}` or similar.\n\nOR\n\n2. Disable Stdlib integration:\n```\nimport sentry_sdk\n\n# Should go before sentry_sdk.init\nsentry_sdk.integrations._DEFAULT_INTEGRATIONS.remove(\"sentry_sdk.integrations.stdlib.StdlibIntegration\")\n\nsentry_sdk.init(...)\n```\n\n### References\n* Sentry docs: [Default integrations](https://docs.sentry.io/platforms/python/integrations/default-integrations/)\n* Python docs: [subprocess module](https://docs.python.org/3/library/subprocess.html)\n* Patch https://github.com/getsentry/sentry-python/pull/3251","status":"published","published":"2024-07-18T17:18:46Z","modified":"2026-07-07T17:56:58.426287284Z","cvss":[{"version":"3.1","score":2.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N","level":"low"},{"version":"4.0","score":1.8,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N","level":"low"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T15:46:47.472172Z"},{"id":"PYSEC-2026-1917","title":"Sentry's Python SDK unintentionally exposes environment variables to subprocesses","description":"### Impact\n\nThe bug in Sentry's Python SDK \u003c2.8.0 results in the unintentional exposure of environment variables to subprocesses despite the `env={}` setting.\n\n### Details\n\nIn 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, like in this example:\n\n```\n\u003e\u003e\u003e subprocess.check_output([\"env\"], env={\"TEST\":\"1\"})\nb'TEST=1\\n'\n```\n\nIf you'd want to not pass any variables, you can set an empty dict:\n\n```\n\u003e\u003e\u003e subprocess.check_output([\"env\"], env={})\nb''\n```\n\nHowever, the bug in Sentry SDK \u003c2.8.0 causes **all environment variables** to be passed to the subprocesses when `env={}` is set, unless the Sentry SDK's [Stdlib](https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib) integration is disabled. The Stdlib integration is enabled by default.\n\n### Patches\nThe issue has been patched in https://github.com/getsentry/sentry-python/pull/3251 and the fix released in [sentry-sdk==2.8.0](https://github.com/getsentry/sentry-python/releases/tag/2.8.0). The fix was also backported to [sentry-sdk==1.45.1](https://github.com/getsentry/sentry-python/releases/tag/1.45.1).\n\n### Workarounds\n\nWe 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, there are two options:\n\n1. In your application, replace `env={}` with the minimal dict `env={\"EMPTY_ENV\":\"1\"}` or similar.\n\nOR\n\n2. Disable Stdlib integration:\n```\nimport sentry_sdk\n\n# Should go before sentry_sdk.init\nsentry_sdk.integrations._DEFAULT_INTEGRATIONS.remove(\"sentry_sdk.integrations.stdlib.StdlibIntegration\")\n\nsentry_sdk.init(...)\n```\n\n### References\n* Sentry docs: [Default integrations](https://docs.sentry.io/platforms/python/integrations/default-integrations/)\n* Python docs: [subprocess module](https://docs.python.org/3/library/subprocess.html)\n* Patch https://github.com/getsentry/sentry-python/pull/3251","status":"published","published":"2026-07-07T14:34:36.976776Z","modified":"2026-07-07T17:47:52.959930142Z","cvss":[{"version":"3.1","score":2.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N","level":"low"},{"version":"4.0","score":1.8,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N","level":"low"}],"updated_at":"2026-11-02T15:52:55.537808Z"},{"id":"UBUNTU-CVE-2024-40647","description":"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK \u003c 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.","status":"published","published":"2024-07-18T17:15:00Z","modified":"2026-10-17T12:57:23.551156886Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T16:54:54.69008Z"},{"id":"openSUSE-SU-2024:0214-1","title":"Security update for python-sentry-sdk","description":"This update for python-sentry-sdk fixes the following issues:\n\n- CVE-2024-40647: Do not leak environment variables to child processes. (bsc#1228128)\n","status":"published","published":"2024-07-23T09:17:13Z","modified":"2026-02-04T02:15:54.281826Z","updated_at":"2026-11-02T16:58:33.135986Z"},{"id":"openSUSE-SU-2024:14209-1","title":"python310-sentry-sdk-2.10.0-1.1 on GA media","description":"These are all security issues fixed in the python310-sentry-sdk-2.10.0-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-07-19T00:00:00Z","modified":"2026-02-04T04:20:37.581518Z","updated_at":"2026-11-02T16:58:36.662953Z"},{"id":"openSUSE-SU-2026:11425-1","title":"python313-sentry-sdk-2.66.1-1.1 on GA media","description":"These are all security issues fixed in the python313-sentry-sdk-2.66.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-08-01T00:00:00Z","modified":"2026-08-02T11:45:09.341527314Z","updated_at":"2026-11-02T16:58:39.516824Z"}]}}
