CVE-2023-36826: Sentry Improper Authorization On Debug And Vulnerability

HIGH
Advisory Identifier: GHSA-m4hc-m2v6-hfw8
CVSS 7.7
CWE-285
Published
Advisory Summary

CVE-2023-36826 is a HIGH (CVSS 7.7) improper authorization on debug and vulnerability (CWE-285: Improper Authorization) affecting Sentry libraries in the PyPI ecosystem. The issue involves improper authorization on debug and artifact file downloads. Remediation is available by upgrading affected packages to version 23.5.2.

CVE-2023-36826 at a Glance

CVE Identifier CVE-2023-36826
GHSA Identifier GHSA-m4hc-m2v6-hfw8
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-285: Improper Authorization
Affected Product Sentry
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-36826

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.

sentry fixed: 23.5.2
pip install sentry>=23.5.2
Verify Direct and Transitive Dependencies

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-36826, 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.5.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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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

### Impact An authenticated user can download a debug or artifact bundle from arbitrary organizations and projects with a known bundle ID. The user does not need to be a member of the organization or have permissions on the project. ### Patches A patch was issued to ensure authorization checks are properly scoped on requests to retrieve debug or artifact bundles. Authenticated users who do not have the necessary permissions on the particular project are no longer able to download them. **Sentry SaaS users do not need to take any action. [Self-Hosted Sentry](https://github.com/getsentry/self-hosted) users should upgrade to version 23.5.2 or higher.** ### References - [Restrict file downloads to Project](https://github.com/getsentry/sentry/pull/49680)

CVE-2023-36826 Affected Sentry Versions

1 component(s)
Fixed Versions:
23.5.2
Product / Package Ecosystem Affected Versions Fixed Version
sentry
PyPI
≥ 8.21.0
< 23.5.2
23.5.2

References

Frequently Asked Questions

What is CVE-2023-36826?
CVE-2023-36826 is a security vulnerability in Sentry involving Improper authorization on debug and artifact file downloads under CWE-285: Improper Authorization.
Which Sentry versions are affected?
Affected versions include releases prior to 23.5.2 across affected packages: sentry.
What version fixes CVE-2023-36826?
Upgrading to 23.5.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sentry affected?
Yes, sentry is affected in releases prior to 23.5.2. Upgrade your dependency to 23.5.2 or later.
What is the CVSS score of CVE-2023-36826?
CVE-2023-36826 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2023-36826?
CVE-2023-36826 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check PyPI dependencies for CVE-2023-36826?
Run the dependency tree command: 'pip show sentry'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m4hc-m2v6-hfw8",
  "modified" : "2024-10-26T22:53:43Z",
  "published" : "2023-07-25T17:19:48Z",
  "aliases" : [ "CVE-2023-36826" ],
  "summary" : "Improper authorization on debug and artifact file downloads",
  "details" : "### Impact\n\nAn authenticated user can download a debug or artifact bundle from arbitrary organizations and projects with a known bundle ID. The user does not need to be a member of the organization or have permissions on the project.\n\n### Patches\n\nA patch was issued to ensure authorization checks are properly scoped on requests to retrieve debug or artifact bundles. Authenticated users who do not have the necessary permissions on the particular project are no longer able to download them.\n\n**Sentry SaaS users do not need to take any action. [Self-Hosted Sentry](https://github.com/getsentry/self-hosted) users should upgrade to version 23.5.2 or higher.**\n\n### References\n\n- [Restrict file downloads to Project](https://github.com/getsentry/sentry/pull/49680)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sentry"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.21.0"
      }, {
        "fixed" : "23.5.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/security/advisories/GHSA-m4hc-m2v6-hfw8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36826"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/pull/49680"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/commit/e932b15435bf36239431eaa3790a6bcfa47046a9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getsentry/sentry"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/sentry/PYSEC-2023-130.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-25T17:19:48Z",
    "nvd_published_at" : "2023-07-25T19:15:11Z"
  }
}