Descrizione

Astro is a web framework for content-driven websites. Prior to @astrojs/prism 4.1.2, and from @astrojs/markdoc 0.3.0 until 2.1.2, runHighlighterWithAstro() returned code unchanged when Prism had no grammar for the requested language, and callers inserted that result as raw HTML. A code block labeled with an unsupported language could therefore render embedded HTML and script instead of displaying it as text. The Prism component was affected when applications supplied untrusted code with an unsupported or attacker-controlled lang, and the @astrojs/markdoc prism() extension was affected for less-trusted content authors even when Markdoc's ordinary HTML rendering was disabled. This issue is fixed in @astrojs/prism 4.1.2 and @astrojs/markdoc 2.1.2.

Testo originale del record CVE (in inglese).

Come correggere

Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.4, EPSS 0.2% (percentile 7).

Versioni da aggiornare

Il record non riporta ancora i prodotti e le versioni corrette (analisi NVD in corso). Consultare l'advisory del vendor nei riferimenti.

Mitigazioni temporanee

Da applicare solo se non è possibile aggiornare subito:

  • Applicare una Content-Security-Policy restrittiva e regole WAF contro XSS; invitare gli utenti a non aprire link sospetti verso l'applicazione.

Verifica

  1. Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
  2. Confrontare la versione installata con quelle indicate sopra.
  3. Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
  4. Ripetere la scansione per confermare la correzione.

Riferimenti