llamaCVEVulnerability Intelligence
/
astro

CVE-2024-56159

Server source code is exposed to the public if sourcemaps are enabled

Parche disponible
Descargar PNG JSON
CVSS 4.0
7.8
Alta
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:L/SA:L Fuente: CNA
5.3NVD · CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
ExplotaciónPoC públicaSSVC: poc · no figura en CISA KEV
Exploits públicos11 fuente
Parche2 versionesPrimer parche a -3 d de la divulgación
Exposición699 dDesde la divulgación, 19 dic 2024, 1:58 p. m.
Detección683 dDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir de cerca
Monitorear y programar la remediación
Existe PoC pública, automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC +1
Explotación
Remediación
Parche 5.0.8
Parche 4.16.18
Monitoreo
Detectada
Verificada
16 dic 24
18 dic 24
19 dic 24
20 dic 24
3 nov 26
13 nov 26
19 nov 26
16 dic 24
10 jun 25
3 dic 25
27 may 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 5.0.8 astro · -3 d desde divulgación
Remediación Parche 4.16.18 astro · -1 d desde divulgación
Divulgación Publicada CVE-2024-56159 divulgada · CVSS 7.8 (CNA)
Divulgación Evaluación SSVC CISA-ADP · explotación PoC pública
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen

Astro is a web framework for content-driven websites. A bug in the build process allows any unauthenticated user to read parts of the server source code. During build, along with client assets such as css and font files, the sourcemap files **for the server code** are moved to a publicly-accessible folder. Any outside party can read them with an unauthorized HTTP GET request to the same server hosting the rest of the website. While some server files are hashed, making their access obscure, the files corresponding to the file system router (those in `src/pages`) are predictably named. For example. the sourcemap file for `src/pages/index.astro` gets named `dist/client/pages/index.astro.mjs.map`. This vulnerability is the root cause of issue #12703, which links to a simple stackblitz project demonstrating the vulnerability. Upon build, notice the contents of the `dist/client` (referred to as `config.build.client` in astro code) folder. All astro servers make the folder in question accessible to the public internet without any authentication. It contains `.map` files corresponding to the code that runs on the server. All **server-output** projects on Astro 5 versions **v5.0.3** through **v5.0.7**, that have **sourcemaps enabled**, either directly or through an add-on such as `sentry`, are affected. The fix for **server-output** projects was released in **astro@5.0.8**. Additionally, all **static-output** projects built using Astro 4 versions **4.16.17 or older**, or Astro 5 versions **5.0.8 or older**, that have **sourcemaps enabled** are also affected. The fix for **static-output** projects was released in **astro@5.0.9**, and backported to Astro v4 in **astro@4.16.18**. The immediate impact is limited to source code. Any secrets or environment variables are not exposed unless they are present verbatim in the source code. There is no immediate loss of integrity within the the vulnerable server. However, it is possible to subsequently discover another vulnerability via the revealed source code . There is no immediate impact to availability of the vulnerable server. However, the presence of an unsafe regular expression, for example, can quickly be exploited to subsequently compromise the availability. The fix for **server-output** projects was released in **astro@5.0.8**, and the fix for **static-output** projects was released in **astro@5.0.9** and backported to Astro v4 in **astro@4.16.18**. Users are advised to update immediately if they are using sourcemaps or an integration that enables sourcemaps.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · NVD
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
astro< 4.16.18
astro≥ 5.0.0-alpha.0 < 5.0.8
astro≥ 5.0.0 < 5.0.8
4.16.18
5.0.0-alpha.0
5.0.0
5.0.8
7.4.12
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmastro
Corregida 4.16.18, 5.0.8 -1 d · -3 d 7.4.12 no afectada
Versiones corregidas4.16.185.0.8
Explotación

Arsenal público

Exploit-DB
—
0
Metasploit
—
0
Nuclei
http/cves/2024/CVE-2024-56159.yaml
1
PoC en GitHub
—
0
Referencias
Fabricantehttps://github.com/withastro/astro/security/advisories/GHSA-49w6-73cw-chjr
Exploithttps://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-56159.yaml
Otrahttps://github.com/withastro/astro/issues/12703
Otrahttps://github.com/getsentry/sentry-javascript/blob/develop/packages/astro/src/integration/index.ts#L50
Otrahttps://github.com/withastro/astro/blob/176fe9f113fd912f9b61e848b00bbcfecd6d5c2c/packages/astro/src/core/build/static-build.ts#L139

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.