CVE-2026-59730: @astrojs/node Backslash-prefixed Paths Not Recognized As Vulnerability

LOW
Advisory Identifier: GHSA-r557-wffq-wvrc
CWE-601
Published
Advisory Summary

CVE-2026-59730 is a LOW backslash-prefixed paths not recognized as vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting @astrojs/node libraries in the npm ecosystem. The issue involves backslash-prefixed paths not recognized as internal by trailing-slash redirect. Remediation is available by upgrading affected packages to version 11.0.2.

CVE-2026-59730 at a Glance

CVE Identifier CVE-2026-59730
GHSA Identifier GHSA-r557-wffq-wvrc
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product @astrojs/node
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-59730

To remediate this vulnerability, upgrade all affected @astrojs/node dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@astrojs/node fixed: 11.0.2
npm install @astrojs/node@11.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @astrojs/node

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-59730, inspect your project dependencies using npm:

npm ls @astrojs/node

Analyze the terminal output to locate any version of @astrojs/node in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.0.2), your application is affected.

Note: The npm ls @astrojs/node command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In @astrojs/node, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 - [WHATWG URL spec: backslash normalization](https://url.spec.whatwg.org/#url-parsing)

CVE-2026-59730 Affected @astrojs/node Versions

1 component(s)
Fixed Versions:
11.0.2
Product / Package Ecosystem Affected Versions Fixed Version
@astrojs/node
npm
≥ 8.1.0
< 11.0.2
11.0.2

References

Frequently Asked Questions

What is CVE-2026-59730?
CVE-2026-59730 is a security vulnerability in @astrojs/node involving Backslash-prefixed paths not recognized as internal by trailing-slash redirect under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which @astrojs/node versions are affected?
Affected versions include releases prior to 11.0.2 across affected packages: @astrojs/node.
What version fixes CVE-2026-59730?
Upgrading to 11.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @astrojs/node affected?
Yes, @astrojs/node is affected in releases prior to 11.0.2. Upgrade your dependency to 11.0.2 or later.
What CWE is associated with CVE-2026-59730?
CVE-2026-59730 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check npm dependencies for CVE-2026-59730?
Run the dependency tree command: 'npm ls @astrojs/node'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r557-wffq-wvrc",
  "modified" : "2026-08-12T20:37:34Z",
  "published" : "2026-07-20T23:22:22Z",
  "aliases" : [ "CVE-2026-59730" ],
  "summary" : "@astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect",
  "details" : "### Impact\n\nWith `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.\n\n**Preconditions:**\n- `trailingSlash: 'always'` must be set (non-default; the default is `'ignore'`)\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: 'ignore'` 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)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@astrojs/node"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.1.0"
      }, {
        "fixed" : "11.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/withastro/astro/security/advisories/GHSA-r557-wffq-wvrc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59730"
  }, {
    "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-20T23:22:22Z",
    "nvd_published_at" : "2026-07-27T21:17:05Z"
  }
}