Advisory

GHSA-r557-wffq-wvrc

Also known as: CVE-2026-59730

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

Severity

Low Basis: The source's own band: LOW

Dates

Published
2026-07-20 23:22 UTC
Modified
2026-08-12 20:45 UTC

Affected packages and fixes

@astrojs/node

npm · All systems

Affected

  • introduced 8.1.0, fixed 11.0.2 (semver)

Fixed versions

11.0.2

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences