CVE-2024-41656: Sentry Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-fm88-hc3v-3www
CVSS 7.1
CWE-80 CWE-79
Published
Advisory Summary

CVE-2024-41656 is a HIGH (CVSS 7.1) cross-site scripting vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Sentry libraries in the PyPI ecosystem. The issue involves sentry vulnerable to stored cross-site scripting (xss). Remediation is available by upgrading affected packages to version 24.7.1.

CVE-2024-41656 at a Glance

CVE Identifier CVE-2024-41656
GHSA Identifier GHSA-fm88-hc3v-3www
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Sentry
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.1

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:U/C:H/I:H/A:H).

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

How to Fix CVE-2024-41656

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: 24.7.1
pip install sentry>=24.7.1
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-2024-41656, 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 24.7.1), 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-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. 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 unsanitized payload sent by an Integration platform integration allows the storage of arbitrary HTML tags on the Sentry side. This payload could subsequently be rendered on the Issues page, creating a Stored Cross-Site Scripting (XSS) vulnerability. This vulnerability might lead to the execution of arbitrary scripts in the context of a user’s browser. Self-hosted Sentry users may be impacted if untrustworthy Integration platform integrations send external issues to their Sentry instance. ### Patches The patch has been released in [Sentry 24.7.1](https://github.com/getsentry/self-hosted/releases/tag/24.7.1) ### Workarounds For Sentry SaaS customers, no action is needed. This has been patched on July 22, and even prior to the fix, the exploitation was not possible due to the strict Content Security Policy deployed on sentry.io site. For self-hosted users, we strongly recommend upgrading Sentry to the latest version. If it is not possible, you could [enable CSP on your self-hosted installation](https://develop.sentry.dev/self-hosted/csp/) with `CSP_REPORT_ONLY = False` (enforcing mode). This will mitigate the risk of XSS. ### References * Sentry Docs: [Integration platform / Create an External Issue](https://docs.sentry.io/api/integration/create-an-external-issue/) * Sentry Docs: [Self-hosted CSP](https://develop.sentry.dev/self-hosted/csp/) * The fix: https://github.com/getsentry/sentry/pull/74648 * PortSwigger: [Stored XSS](https://portswigger.net/web-security/cross-site-scripting/stored)

CVE-2024-41656 Affected Sentry Versions

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

References

Frequently Asked Questions

What is CVE-2024-41656?
CVE-2024-41656 is a security vulnerability in Sentry involving Sentry vulnerable to stored Cross-Site Scripting (XSS) under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Sentry versions are affected?
Affected versions include releases prior to 24.7.1 across affected packages: sentry.
What version fixes CVE-2024-41656?
Upgrading to 24.7.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sentry affected?
Yes, sentry is affected in releases prior to 24.7.1. Upgrade your dependency to 24.7.1 or later.
What is the CVSS score of CVE-2024-41656?
CVE-2024-41656 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-41656?
CVE-2024-41656 is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.).
How can I check PyPI dependencies for CVE-2024-41656?
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-fm88-hc3v-3www",
  "modified" : "2025-09-15T20:07:06Z",
  "published" : "2024-07-23T20:46:39Z",
  "aliases" : [ "CVE-2024-41656" ],
  "summary" : "Sentry vulnerable to stored Cross-Site Scripting (XSS)",
  "details" : "### Impact\nAn unsanitized payload sent by an Integration platform integration allows the storage of arbitrary HTML tags on the Sentry side. This payload could subsequently be rendered on the Issues page, creating a Stored Cross-Site Scripting (XSS) vulnerability. This vulnerability might lead to the execution of arbitrary scripts in the context of a user’s browser.\n\nSelf-hosted Sentry users may be impacted if untrustworthy Integration platform integrations send external issues to their Sentry instance.\n\n### Patches\nThe patch has been released in [Sentry 24.7.1](https://github.com/getsentry/self-hosted/releases/tag/24.7.1)\n\n### Workarounds\nFor Sentry SaaS customers, no action is needed. This has been patched on July 22, and even prior to the fix, the exploitation was not possible due to the strict Content Security Policy deployed on sentry.io site.\n\nFor self-hosted users, we strongly recommend upgrading Sentry to the latest version. If it is not possible, you could [enable CSP on your self-hosted installation](https://develop.sentry.dev/self-hosted/csp/) with `CSP_REPORT_ONLY = False` (enforcing mode). This will mitigate the risk of XSS.\n\n### References\n* Sentry Docs: [Integration platform / Create an External Issue](https://docs.sentry.io/api/integration/create-an-external-issue/)\n* Sentry Docs: [Self-hosted CSP](https://develop.sentry.dev/self-hosted/csp/)\n* The fix: https://github.com/getsentry/sentry/pull/74648\n* PortSwigger: [Stored XSS](https://portswigger.net/web-security/cross-site-scripting/stored)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sentry"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "24.7.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/security/advisories/GHSA-fm88-hc3v-3www"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41656"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/pull/74648"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/commit/5c679521f1539eabfb81287bfc30f34dbecd373e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/self-hosted/releases/tag/24.7.1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getsentry/sentry"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-80" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-23T20:46:39Z",
    "nvd_published_at" : "2024-07-23T22:15:08Z"
  }
}