GHSA-r557-wffq-wvrc

Suggest an improvement
Source
https://github.com/advisories/GHSA-r557-wffq-wvrc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-r557-wffq-wvrc/GHSA-r557-wffq-wvrc.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-r557-wffq-wvrc
Aliases
Published
2026-07-20T23:22:22Z
Modified
2026-08-12T20:45:07Z
Severity
  • 2.1 (Low) CVSS_V4 - 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 CVSS Calculator
Summary
@astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect
Details

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

Database specific
{
    "cwe_ids": [
        "CWE-601"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-20T23:22:22Z",
    "nvd_published_at": "2026-07-27T21:17:05Z",
    "severity": "LOW"
}
References

Affected packages

npm / @astrojs/node

Package

Name
@astrojs/node
View open source insights on deps.dev
Purl
pkg:npm/%40astrojs/node

Affected ranges

Type
SEMVER
Events
Introduced
8.1.0
Fixed
11.0.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-r557-wffq-wvrc/GHSA-r557-wffq-wvrc.json"