GHSA-29pr-6jr8-q5jm

Source
https://github.com/advisories/GHSA-29pr-6jr8-q5jm
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/03/GHSA-29pr-6jr8-q5jm/GHSA-29pr-6jr8-q5jm.json
Aliases
Published
2023-03-21T22:31:19Z
Modified
2023-11-08T04:12:09.171189Z
Details

Impact

When using the Django integration of the Sentry SDK in a specific configuration it is possible to leak sensitive cookies values, including the session cookie to Sentry. These sensitive cookies could then be used by someone with access to your Sentry issues to impersonate or escalate their privileges within your application.

The below must be true in order for these sensitive values to be leaked: 1. Your Sentry SDK configuration has sendDefaultPII set to True 2. You are using a custom name for either of the cookies below in your Django settings. - SESSION_COOKIE_NAME or - CSRF_COOKIE_NAME Django settings 3. You are not configured in your organization or project settings to use our data scrubbing features to account for the custom cookie names

Patches

As of version 1.14.0, the Django integration of the sentry-sdk will detect the custom cookie names based on your Django settings and will remove the values from the payload before sending the data to Sentry.

Workarounds

If you can not update your sentry-sdk to a patched version than you can use the SDKs filtering mechanism to remove the cookies from the payload that is sent to Sentry. For error events this can be done with the beforesend callback method and for performance related events (transactions) you can use the beforesend_transaction callback method.

If you'd like to handle filtering of these values on the server-side, you can also use our advanced data scrubbing feature to account for the custom cookie names. Look for the $http.cookies, $http.headers, $request.cookies, or $request.headers fields to target with your scrubbing rule.

References

Credits

References

Affected packages

PyPI / sentry-sdk

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0The exact introduced commit is unknown
Fixed
1.14.0

Affected versions

0.*

0.1.0rc1
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.0rc10
0.1.0rc11
0.1.0rc12
0.1.0rc13
0.1.0rc14
0.1.0rc15
0.1.0rc16
0.1.0
0.1.1
0.1.2
0.1.3
0.2.1
0.2.2
0.3.0
0.3.1
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.3.10
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