XSS: dangerouslySetInnerHTML in chart component renders unsanitized content
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- nextjs, typescript
Research direction
Start at src/components/ui/chart.tsx:81 and inspect how chart content reaches dangerouslySetInnerHTML. Trace whether labels, tooltips, axis values, or other user-submitted fields can enter this path, then review the project’s existing dependency and data-layer patterns. Done means untrusted chart content is safely handled and the component no longer presents an XSS path.
Written by the indexing model from the issue text.
Description
Issue
src/components/ui/chart.tsx:81 uses dangerouslySetInnerHTML to render chart content:
<div dangerouslySetInnerHTML={{ __html: ... }} />
Why this matters
If any chart data (labels, tooltips, axis values) comes from user-submitted content like course names, professor names, or review text, malicious HTML could be injected. Even if data is currently from trusted sources, this creates a persistent XSS vector if the data source changes in the future.
Fix
Use DOMPurify or sanitize at the data layer before passing to the chart component.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenLake/RateMyCourse
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenLake/RateMyCourse#66 ·
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenLake/RateMyCourse#61 ·
-
bug help wanted
Difficulty 4/5 3-5 days Newbie friendliness 48/100
OpenLake/RateMyCourse#60 ·
-
advanced bug enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
OpenLake/RateMyCourse#58 ·
-
help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
OpenLake/RateMyCourse#49 · 1 comment ·
All issues in OpenLake/RateMyCourse
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·