cve.bz

CVE-2024-40647 getsentry sentry-python

5.3 mediumEPSS 0.2%Fix available

Medium (5.3) in getsentry sentry-python. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in sentry-sdk 1.45.1, 2.8.0.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 10th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-07-18. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-40647 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-40647?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-40647?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-40647 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
getsentry sentry-python< 2.8.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-g92j-qhmh-64v2PyPIsentry-sdk>=2.0.0a1 <2.8.02.8.0
GHSA-g92j-qhmh-64v2PyPIsentry-sdk<1.45.11.45.1
PYSEC-2026-1917PyPIsentry-sdk<1.45.1
>=2.0.0a1 <2.8.0
1.45.1, 2.8.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11sentry-python0.13.2-1+deb11u1DLA-4612-1
Debian12sentry-python1.9.10-2+deb12u1DEBIAN-CVE-2024-40647
Debian13, 14sentry-python2.16.0-1DEBIAN-CVE-2024-40647
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTS and 3 moresentry-pythonno fix listedUBUNTU-CVE-2024-40647
SUSEPackage Hub 15 SP5python-sentry-sdk0.14.4-bp155.3.3.1openSUSE-SU-2024:0214-1
openSUSELeap 15.5python-sentry-sdk0.14.4-bp155.3.3.1openSUSE-SU-2024:0214-1
openSUSETumbleweedpython-sentry-sdk2.10.0-1.1openSUSE-SU-2024:14209-1
openSUSETumbleweedpython-sentry-sdk2.66.1-1.1openSUSE-SU-2026:11425-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-200 (59).

References

Check your stackJSON