XSS: dangerouslySetInnerHTML in chart component renders unsanitized content

Aperta
#59 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
nextjs, typescript
Ambito
frontend, security

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

advanced bug

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.

Lingua principale
TypeScript
Stelle
0
Fork
26
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenLake/RateMyCourse

Tutte le issue di OpenLake/RateMyCourse

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.