CVE-2026-59730

@astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect

Published Jul 27, 2026 CVSS 4.0 · 2.1 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The @astrojs/node standalone server in Astro versions 8.1.0 through 11.0.1 performs a trailing‑slash redirect when the configuration option trailingSlash is set to "always". Paths beginning with a backslash are not recognized as internal locations and the handler echoes the raw path into the Location header of a 301 response. Because browsers treat a backslash as a forward slash per the WHATWG URL specification, the redirect could resolve to an external host. Pre‑conditions for exploitation include trailingSlash set to "always", the request path lacking a file extension in its final segment, and an attacker delivering a crafted link to a user. This issue represents an open redirect flaw (CWE‑601).

Affected Systems

Astro, the content‑driven web framework hosted by withastro:astro, is affected. The vulnerability applies to @astrojs/node versions 8.1.0 through 11.0.1. Updating to version 11.0.2 or later resolves the issue.

Risk and Exploitability

The CVSS score of 2.1 indicates low severity, and an EPSS score of < 1% suggests minimal exploitation pressure. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires that trailingSlash be set to "always", that the request target lack a file extension in its final segment, and that the attacker supply a crafted link to an end‑user. Attack would proceed via a user clicking a link or following a redirect, potentially leading to a malicious site. The likelihood of successful exploitation is low but the risk of social‑engineering attacks remains.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade @astrojs/node to version 11.0.2 or later.
  • Set the configuration option trailingSlash to "ignore" (the default) or remove trailing‑slash redirect logic if it is not required for the application.
  • Ensure any custom redirects use a whitelist or validate the target URL to prevent open redirect behavior.

Generated by OpenCVE AI on August 3, 2026 at 16:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-r557-wffq-wvrc @astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Withastro
Withastro astro
Vendors & Products Withastro
Withastro astro
Type Values Removed Values Added
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.
Title @astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect
Weaknesses CWE-601
References
Metrics cvssV4_0

{'score': 2.1, 'vector': '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'}

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 28, 2026, 1:49 PM
Reserved
Jul 6, 2026, 3:34 PM
Status
Deferred
Published
Jul 27, 2026, 9:17 PM
Modified
Oct 24, 2026, 1:10 PM