GHSA-R557-WFFQ-WVRC
Vulnerability from github – Published: 2026-07-20 23:22 – Updated: 2026-07-20 23:22Impact
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
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@astrojs/node"
},
"ranges": [
{
"events": [
{
"introduced": "8.1.0"
},
{
"fixed": "11.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-59730"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-20T23:22:22Z",
"nvd_published_at": null,
"severity": "LOW"
},
"details": "### Impact\n\nWith `trailingSlash: \u0027always\u0027` configured, the `@astrojs/node` standalone server\u0027s 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.\n\n**Preconditions:**\n- `trailingSlash: \u0027always\u0027` must be set (non-default; the default is `\u0027ignore\u0027`)\n- The request path must not have a file extension in its final segment\n- An attacker must deliver the crafted link to a user\n\n### Patches\n\nFixed by treating backslash-prefixed paths the same as `//`-prefixed paths in `isInternalPath()`, so they are no longer rewritten with a trailing slash.\n\n### Workarounds\n\nUse the default `trailingSlash: \u0027ignore\u0027` setting, which does not issue trailing-slash redirects in the static file handler.\n\n### References\n\n- [WHATWG URL spec: backslash normalization](https://url.spec.whatwg.org/#url-parsing)",
"id": "GHSA-r557-wffq-wvrc",
"modified": "2026-07-20T23:22:22Z",
"published": "2026-07-20T23:22:22Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/withastro/astro/security/advisories/GHSA-r557-wffq-wvrc"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/pull/17252"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/commit/eb6f97e391ee587747e37609c255c7cd4b9cce3c"
},
{
"type": "PACKAGE",
"url": "https://github.com/withastro/astro"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/releases/tag/@astrojs/node@11.0.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "@astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.