CVE-2024-41656: Sentry Cross-Site Scripting Vulnerability
HIGHCVE-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
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).
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.
pip install sentry>=24.7.1
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
CVE-2024-41656 Affected Sentry Versions
1 component(s)| 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?
Which Sentry versions are affected?
What version fixes CVE-2024-41656?
Is sentry affected?
What is the CVSS score of CVE-2024-41656?
What CWE is associated with CVE-2024-41656?
How can I check PyPI dependencies for CVE-2024-41656?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}