Live threats

All CVEs / getsentry

CVE-2024-40647getsentry sentry-python

Medium 5.3

Priority
32
CVSS 3.1
5.3
EPSS
0.3%
probability of exploitation in 30 days · percentile 12
Auth required
Yes
Published
Jul 18, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-200
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for sentry-python.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI sentry-sdk ≥ 2.0.0a1 < 2.8.0 2.8.0 pip install "sentry-sdk>=2.8.0"
PyPI sentry-sdk < 1.45.1 1.45.1 pip install "sentry-sdk>=1.45.1"
PyPI sentry-sdk < 1.45.1 1.45.1 pip install "sentry-sdk>=1.45.1"
PyPI sentry-sdk ≥ 2.0.0a1 < 2.8.0 2.8.0 pip install "sentry-sdk>=2.8.0"

Per OSV / GitHub Advisories (GHSA-g92j-qhmh-64v2, PYSEC-2026-1917). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.