CVE-2022-23485: Sentry Sentry Vulnerable To Invite Code Vulnerability

MODERATE
Advisory Identifier: GHSA-jv85-mqxj-3f9j
CVSS 6.4
CWE-284 CWE-269
Published
Advisory Summary

CVE-2022-23485 is a MODERATE (CVSS 6.4) sentry vulnerable to invite code vulnerability (CWE-284: Improper Access Control) affecting Sentry libraries in the PyPI ecosystem. The issue involves sentry vulnerable to invite code reuse via cookie manipulation. Remediation is available by upgrading affected packages to version 22.11.0.

CVE-2022-23485 at a Glance

CVE Identifier CVE-2022-23485
GHSA Identifier GHSA-jv85-mqxj-3f9j
Severity MODERATE
CVSS v3.1 Base Score 6.4
CWE Classification CWE-284: Improper Access Control
Affected Product Sentry
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.4

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

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

How to Fix CVE-2022-23485

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: 22.11.0
pip install sentry>=22.11.0
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-2022-23485, 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 22.11.0), 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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. 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

With a known valid invite link (i.e. not already accepted or expired) an unauthenticated attacker can manipulate the cookie to allow the same invite link to be reused on multiple accounts when joining an organization. ### Impact An attacker with a valid invite link can create multiple users and join the organization from which the invite link was generated. ### Patches This issue was patched in version 22.11.0. ### Workarounds Sentry SaaS customers do not need to take action. Self-hosted Sentry installs can disable the invite functionality until they are ready to deploy the patched version by editing their `sentry.conf.py` file (usually located at `~/.sentry/`). 1. Add the following line into `sentry.conf.py`: ```python SENTRY_FEATURES["organizations:invite-members"] = False ``` 2. Restart the Sentry web service. ``` docker compose restart web ``` ### For more information If you have any questions or comments about this advisory: * [Visit our FAQs on this CVE](https://help.sentry.io/account/security/cve-2022-23485-faqs/) * Open an issue in [getsentry/sentry](http://github.com/getsentry/sentry) * Email us at security[@]sentry.io

CVE-2022-23485 Affected Sentry Versions

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

References

Frequently Asked Questions

What is CVE-2022-23485?
CVE-2022-23485 is a security vulnerability in Sentry involving Sentry vulnerable to invite code reuse via cookie manipulation under CWE-284: Improper Access Control.
Which Sentry versions are affected?
Affected versions include releases prior to 22.11.0 across affected packages: sentry.
What version fixes CVE-2022-23485?
Upgrading to 22.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sentry affected?
Yes, sentry is affected in releases prior to 22.11.0. Upgrade your dependency to 22.11.0 or later.
What is the CVSS score of CVE-2022-23485?
CVE-2022-23485 has a CVSS v3.1 base score of 6.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L.
What CWE is associated with CVE-2022-23485?
CVE-2022-23485 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check PyPI dependencies for CVE-2022-23485?
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-jv85-mqxj-3f9j",
  "modified" : "2024-10-22T17:30:35Z",
  "published" : "2022-12-12T21:27:09Z",
  "aliases" : [ "CVE-2022-23485" ],
  "summary" : "Sentry vulnerable to invite code reuse via cookie manipulation",
  "details" : "With a known valid invite link (i.e. not already accepted or expired) an unauthenticated attacker can manipulate the cookie to allow the same invite link to be reused on multiple accounts when joining an organization.\n\n### Impact\nAn attacker with a valid invite link can create multiple users and join the organization from which the invite link was generated.\n\n### Patches\nThis issue was patched in version 22.11.0.\n\n### Workarounds\nSentry SaaS customers do not need to take action.\n\nSelf-hosted Sentry installs can disable the invite functionality until they are ready to deploy the patched version by editing their `sentry.conf.py` file (usually located at `~/.sentry/`).\n\n1. Add the following line into `sentry.conf.py`:\n\n    ```python\n     SENTRY_FEATURES[\"organizations:invite-members\"] = False\n    ```\n2. Restart the Sentry web service.\n\n    ```\n    docker compose restart web\n    ```\n\n### For more information\nIf you have any questions or comments about this advisory:\n* [Visit our FAQs on this CVE](https://help.sentry.io/account/security/cve-2022-23485-faqs/)\n* Open an issue in [getsentry/sentry](http://github.com/getsentry/sentry)\n* Email us at security[@]sentry.io\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sentry"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.6.0"
      }, {
        "fixed" : "22.11.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/security/advisories/GHSA-jv85-mqxj-3f9j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23485"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/commit/565f971da955d57c754a47f5802fe9f9f7c66b39"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getsentry/sentry"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/sentry/PYSEC-2022-43011.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-284" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-12T21:27:09Z",
    "nvd_published_at" : "2022-12-10T01:15:00Z"
  }
}