Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

XSS vulnerability: dangerouslySetInnerHTML in chart component

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet

Research direction

Start by reading src/components/ui/chart.tsx around line 81 and trace the value passed to __html, then inspect scripts/scrape_professors.py around line 51. Check whether chart content can contain user-controlled data and where SSL verification is disabled. Done means both unsafe rendering and disabled certificate verification are addressed, with behavior preserved when HTML is not required.

Written by the indexing model from the issue text.

Description

advanced bug enhancement

🔍 Issue

`src/components/ui/chart.tsx:81` uses `dangerouslySetInnerHTML` to render chart content.

Context

This appears to be a custom chart component that renders HTML inside the chart labels/tooltips. If any chart data (labels, tooltips, axis values) comes from user input (e.g., course names, professor names, review text), malicious HTML could be injected.

✅ Fix

If this is a shadcn/ui or Radix chart component, the `dangerouslySetInnerHTML` is likely unnecessary. Check:

  1. What data is being passed to the `__html` prop?
  2. Can any of that data be user-controlled?
  3. Switch to safe DOM text rendering or use DOMPurify if HTML rendering is required.

Additionally, `scripts/scrape_professors.py:51` uses `requests.get(url, verify=False)` — disabling SSL verification is dangerous and should be fixed in production.

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenLake/RateMyCourse

All issues in OpenLake/RateMyCourse

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.