Advisory

PYSEC-2026-1912

Also known as: CVE-2023-39349, GHSA-9jcq-jf57-c62c

Summary

Privilege escalation via ApiTokensEndpoint

Details

Impact
An attacker with access to a token with few or no scopes can query /api/0/api-tokens/ for a list of all tokens created by a user, including tokens with greater scopes, and use those tokens in other requests.

There is no evidence that the issue was exploited on https://sentry.io. For self-hosted users, it is advised to rotate user auth tokens via https://your-self-hosted-sentry-installation/settings/account/api/auth-tokens/.

Patches
The issue was fixed in https://github.com/getsentry/sentry/pull/53850 and is available in the release 23.7.2 of sentry and self-hosted.

Workarounds
There are no known workarounds.

Severity

High Basis: CVSS v3 score 8.1, vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Dates

Published
2026-07-07 11:45 UTC
Modified
2026-07-07 17:47 UTC

Affected packages and fixes

sentry

PyPI · All systems

Affected

  • introduced 22.1.0, fixed 23.7.2 (ecosystem)

Fixed versions

23.7.2

Fix

  • Fixed version 23.7.2
    pip install --upgrade sentry==23.7.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences