CVE-2023-39531: Sentry Sentry Vulnerable To Incorrect Credential Vulnerability
MODERATECVE-2023-39531 is a MODERATE (CVSS 6.5) sentry vulnerable to incorrect credential vulnerability (CWE-287: Improper Authentication) affecting Sentry libraries in the PyPI ecosystem. The issue involves sentry vulnerable to incorrect credential validation on oauth token requests. Remediation is available by upgrading affected packages to version 23.7.2.
CVE-2023-39531 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N).
How to Fix CVE-2023-39531
To remediate this vulnerability, upgrade all affected Sentry dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install sentry>=23.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show sentry
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-39531, inspect your installed packages using pip:
pip show sentry
Analyze the terminal output to locate any version of Sentry in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 23.7.2), your application is affected.
Note: The pip show sentry command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Sentry, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-39531 Affected Sentry Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sentry
|
PyPI |
≥ 10.0.0
< 23.7.2
|
23.7.2
|
References
Frequently Asked Questions
What is CVE-2023-39531?
Which Sentry versions are affected?
What version fixes CVE-2023-39531?
Is sentry affected?
What is the CVSS score of CVE-2023-39531?
What CWE is associated with CVE-2023-39531?
How can I check PyPI dependencies for CVE-2023-39531?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hgj4-h2x3-rfx4",
"modified" : "2023-08-09T20:58:47Z",
"published" : "2023-08-09T20:58:47Z",
"aliases" : [ "CVE-2023-39531" ],
"summary" : "Sentry vulnerable to incorrect credential validation on OAuth token requests",
"details" : "### Impact\n\nAn attacker with sufficient client-side exploits could retrieve a valid access token for another user during the OAuth token exchange due to incorrect credential validation. The client ID must be known and the API application must have already been authorized on the targeted user account. \n\n### Remediation\n\n- **Sentry SaaS** customers do not need to take any action. Those with the highest risk will be contacted directly by Sentry.\n- **Self-hosted installations** should upgrade to version 23.7.2 or higher.\n\n### Workarounds\n\nThere are no direct workarounds, but users should review applications authorized on their account (_User Settings > Authorized Applications_) and remove any that are no longer needed.\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "sentry"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0"
}, {
"fixed" : "23.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getsentry/sentry/security/advisories/GHSA-hgj4-h2x3-rfx4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-39531"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getsentry/sentry"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-09T20:58:47Z",
"nvd_published_at" : "2023-08-09T17:15:09Z"
}
}