5.3

CVE-2024-40647: Unintentional exposure of environment variables to subprocesses in sentry-sdk

Deferred
AliasesopenSUSE-SU-2024:0214-1GHSA-g92j-qhmh-64v2PYSEC-2026-1917
Published 18-07-2024Last modified 01-06-2026

Vulnerability summary

CVE-2024-40647 is a medium (CVSS 5.3) vulnerability in getsentry sentry-python. EPSS estimates a 0.20% chance of exploitation in the next 30 days, higher than 9.8% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.3, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.3/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.20%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Timeline

  1. 18-07-2024
    PublishedVulnerability first disclosed.
  2. 01-06-2026
    Last modifiedVulnerability information updated.

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 metrics

6 scores · 5 sources · 2 versions

EPSS trend

Probability

0.20%

Chance of exploitation in the next 30 days

Percentile

10%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.20% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, administrative account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Opensuse2 products
  • python-sentry-sdk&distro=openSUSE Leap 15.5< 0.14.4-bp155.3.3.1
  • python-sentry-sdk&distro=openSUSE Tumbleweed< 2.10.0-1.1 | < 2.66.1-1.1
Debian1 product
  • sentry-python< 1.9.10-2+deb12u1 | < 2.16.0-1
Getsentry1 product
PyPI1 product
  • sentry-sdk< 1.45.1 | ≥ 2.0.0a1, < 2.8.0
Suse1 product
  • python-sentry-sdk&distro=SUSE Package Hub 15 SP5< 0.14.4-bp155.3.3.1
Ubuntu1 product
  • sentry-pythonAll versions (No fix recorded)

6 vendors · 7 products

References

19 links
Show all 19 references