2.1low
@astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect
- Severity
- 2.1low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.36% (higher than 31% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-r557-wffq-wvrc
Description
Astro is a web framework for content-driven websites. In versions 8.1.0 through 11.0.1, when trailingSlash: 'always' is configured, the @astrojs/node standalone server's static file handler appends a trailing slash to request paths and issues a 301 redirect. Paths beginning with /\ (slash-backslash) were not recognized as internal paths, so the handler would echo the raw path back in the Location header. Because browsers treat \ as / per the WHATWG URL specification, the resulting redirect could resolve to an external host. Preconditions for exploitation: trailingSlash: 'always' must be set (non-default; the default is 'ignore'), the request path must not have a file extension in its final segment, and an attacker must deliver the crafted link to a user. This issue has been fixed in version 11.0.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| withastro astro | >= 8.1.0, < 11.0.2 | CVE List |
| @astrojs/node (npm) | from 8.1.0 before 11.0.2 | GitHub Advisory Database |
All scores
| GitHub_M | 2.1low CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Astro is a web framework for content-driven websites. In versions 8.1.0 through 11.0.1, when trailingSlash: 'always' is configured, the @astrojs/node standalone server's static file handler appends a trailing slash to request paths and issues a 301 redirect. Paths beginning with /\ (slash-backslash) were not recognized as internal paths, so the handler would echo the raw path back in the Location header. Because browsers treat \ as / per the WHATWG URL specification, the resulting redirect could resolve to an external host. Preconditions for exploitation: trailingSlash: 'always' must be set (non-default; the default is 'ignore'), the request path must not have a file extension in its final segment, and an attacker must deliver the crafted link to a user. This issue has been fixed in version 11.0.2.
GitHub Advisory Database
Impact
With trailingSlash: 'always' configured, the @astrojs/node standalone server's static file handler appends a trailing slash to request paths and issues a 301 redirect. Paths beginning with /\ (slash-backslash) were not recognized as internal paths, so the handler would echo the raw path back in the Location header. Because browsers treat \ as / per the WHATWG URL specification, the resulting redirect could resolve to an external host.
Preconditions:
trailingSlash: 'always'must be set (non-default; the default is'ignore')- The request path must not have a file extension in its final segment
- An attacker must deliver the crafted link to a user
Patches
Fixed by treating backslash-prefixed paths the same as //-prefixed paths in isInternalPath(), so they are no longer rewritten with a trailing slash.
Workarounds
Use the default trailingSlash: 'ignore' setting, which does not issue trailing-slash redirects in the static file handler.
References
NVD (es)
Astro es un framework web para sitios web basados en contenido. En las versiones 8.1.0 a 11.0.1, cuando trailingSlash: ’always’ está configurado, el gestor de archivos estáticos del servidor independiente @astrojs/node añade una barra final a las rutas de solicitud y emite una redirección 301. Las rutas que comienzan con /\ (barra-barra invertida) no eran reconocidas como rutas internas, por lo que el gestor devolvía la ruta original en el encabezado Location. Debido a que los navegadores tratan \ como / según la especificación de URL de WHATWG, la redirección resultante podría resolverse en un host externo. Precondiciones para la explotación: trailingSlash: ’always’ debe estar configurado (no es el valor predeterminado; el valor predeterminado es ’ignore’), la ruta de solicitud no debe tener una extensión de archivo en su segmento final, y un atacante debe entregar el enlace manipulado a un usuario. Este problema ha sido solucionado en la versión 11.0.2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-59730 changed 2026-07-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-r557-wffq-wvrc changed 2026-08-12 | CC-BY-4.0 |
| NVD | CVE-2026-59730 changed 2026-10-24 | Public domain |