Skip to content

chore(deps): update dependency sentry-sdk to v2.8.0 [security]#592

Merged
glanzel merged 1 commit into
mainfrom
renovate/pypi-sentry-sdk-vulnerability
Apr 20, 2026
Merged

chore(deps): update dependency sentry-sdk to v2.8.0 [security]#592
glanzel merged 1 commit into
mainfrom
renovate/pypi-sentry-sdk-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Jul 18, 2024

This PR contains the following updates:

Package Change Age Confidence
sentry-sdk (changelog) ==2.7.0==2.8.0 age confidence

GitHub Vulnerability Alerts

CVE-2024-40647

Impact

The bug in Sentry's Python SDK <2.8.0 results in the unintentional exposure of environment variables to subprocesses despite the env={} setting.

Details

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, like in this example:

>>> subprocess.check_output(["env"], env={"TEST":"1"})
b'TEST=1\n'

If you'd want to not pass any variables, you can set an empty dict:

>>> subprocess.check_output(["env"], env={})
b''

However, the bug in Sentry SDK <2.8.0 causes all environment variables to be passed to the subprocesses when env={} is set, unless the Sentry SDK's Stdlib integration is disabled. The Stdlib integration is enabled by default.

Patches

The issue has been patched in https://github.com/getsentry/sentry-python/pull/3251 and the fix released in sentry-sdk==2.8.0. The fix was also backported to sentry-sdk==1.45.1.

Workarounds

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, there are two options:

  1. In your application, replace env={} with the minimal dict env={"EMPTY_ENV":"1"} or similar.

OR

  1. Disable Stdlib integration:
import sentry_sdk

# Should go before sentry_sdk.init
sentry_sdk.integrations._DEFAULT_INTEGRATIONS.remove("sentry_sdk.integrations.stdlib.StdlibIntegration")

sentry_sdk.init(...)

References

Severity
  • CVSS Score: 1.8 / 10 (Low)
  • Vector String: 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

Release Notes

getsentry/sentry-python (sentry-sdk)

v2.8.0

Compare Source

Various fixes & improvements

v2.7.1

Compare Source

Various fixes & improvements

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the renovate label Jul 18, 2024
@renovate renovate Bot force-pushed the renovate/pypi-sentry-sdk-vulnerability branch from 48b2ab4 to 534adf7 Compare July 21, 2025 14:31
@renovate renovate Bot force-pushed the renovate/pypi-sentry-sdk-vulnerability branch from 534adf7 to 31022ac Compare August 10, 2025 15:08
@renovate renovate Bot force-pushed the renovate/pypi-sentry-sdk-vulnerability branch from 31022ac to 7fa4814 Compare February 12, 2026 15:44
@renovate renovate Bot changed the title chore(deps): update dependency sentry-sdk to v2.8.0 [security] chore(deps): update dependency sentry-sdk to v2.8.0 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot deleted the renovate/pypi-sentry-sdk-vulnerability branch March 27, 2026 00:38
@renovate renovate Bot changed the title chore(deps): update dependency sentry-sdk to v2.8.0 [security] - autoclosed chore(deps): update dependency sentry-sdk to v2.8.0 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/pypi-sentry-sdk-vulnerability branch 2 times, most recently from 7fa4814 to df58e41 Compare March 30, 2026 21:22
@glanzel glanzel merged commit 713118e into main Apr 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant