1. Archivio CVE
  2. 2025
  3. CVE-2025-61925

CVE-2025-61925

6.5 Gravità media CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L 6.5 – Media

Descrizione

Astro is a web framework. Prior to version 5.14.2, Astro reflects the value in `X-Forwarded-Host` in output when using `Astro.url` without any validation. It is common for web servers such as nginx to route requests via the `Host` header, and forward on other request headers. As such as malicious request can be sent with both a `Host` header and an `X-Forwarded-Host` header where the values do not match and the `X-Forwarded-Host` header is malicious. Astro will then return the malicious value. This could result in any usages of the `Astro.url` value in code being manipulated by a request. For example if a user follows guidance and uses `Astro.url` for a canonical link the canonical link can be manipulated to another site. It is theoretically possible that the value could also be used as a login/registration or other form URL as well, resulting in potential redirecting of login credentials to a malicious party. As this is a per-request attack vector the surface area would only be to the malicious user until one considers that having a caching proxy is a common setup, in which case any page which is cached could persist the malicious value for subsequent users. Many other frameworks have an allowlist of domains to validate against, or do not have a case where the headers are reflected to avoid such issues. This could affect anyone using Astro in an on-demand/dynamic rendering mode behind a caching proxy. Version 5.14.2 contains a fix for the issue.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
astro astro < 5.14.2 node.js
Tutte le 20 vulnerabilità di Astro

Tipo di vulnerabilità

CWE-470 Use of Externally-Controlled Input to Select Classes or Code

The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.

Impatto sui sistemi

AmbitoImpatto
Integrità, Riservatezza, Disponibilità, Altro Eseguire codice o comandi non autorizzati, Alterare la logica di esecuzione
Disponibilità, Altro Interruzione del servizio: arresto o riavvio, Altro
Riservatezza Leggere i dati dell’applicazione

Come si previene

Architettura e progettazione Refactor your code to avoid using reflection.
Architettura e progettazione Do not use user-controlled inputs to select and load classes or code.
Sviluppo Apply strict input validation by using allowlists or indirect selection to ensure that the user is only selecting allowable classes or code.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 146 CVE di tipo CWE-470, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org