8.1high
Sentry vulnerable to privilege escalation via ApiTokensEndpoint
- Severity
- 8.1high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.06% (higher than 65% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-9jcq-jf57-c62cPYSEC-2026-1912
Description
Sentry is an error tracking and performance monitoring platform. Starting in version 22.1.0 and prior to version 23.7.2, 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 `sentry.io`. For self-hosted users, it is advised to rotate user auth tokens. A fix is available in version 23.7.2 of `sentry` and `self-hosted`. There are no known workarounds.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| getsentry sentry | >= 22.1.0, < 23.7.2, from 22.1.0 before 23.7.2 | CVE List |
| sentry (PyPI) | from 22.1.0 before 23.7.2 | GitHub Advisory Database, PyPA Advisory Database |
| sentry sentry | from 22.1.0 before 23.7.2 | NVD |
All scores
| GitHub_M | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| PyPA Advisory Database | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
Classification
What each source says
CVE List
Sentry is an error tracking and performance monitoring platform. Starting in version 22.1.0 and prior to version 23.7.2, 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 `sentry.io`. For self-hosted users, it is advised to rotate user auth tokens. A fix is available in version 23.7.2 of `sentry` and `self-hosted`. There are no known workarounds.
GitHub Advisory Database
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.
References
| https://github.com/getsentry/sentry/security/advisories/GHSA-9jcq-jf57-c62c | exploit, patch, third-party-advisory, web | |
| https://github.com/getsentry/sentry/pull/53850 | patch, web | |
| https://github.com/getsentry/sentry/commit/fad12c1150d1135edf9666ea72ca11bc110c1083 | patch, web | |
| https://github.com/getsentry/self-hosted/releases/tag/23.7.2 | release-notes, web | |
| https://github.com/getsentry/sentry/releases/tag/23.7.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-39349 | advisory | |
| https://github.com/getsentry/sentry | package | |
| https://pypi.org/project/sentry | package | |
| https://github.com/advisories/GHSA-9jcq-jf57-c62c | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-39349 changed 2024-10-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9jcq-jf57-c62c changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2023-39349 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1912 changed 2026-07-07 | CC-BY-4.0 |