CVE-2026-59730: @astrojs/node - Backslash-Prefixed Paths Not Recognized as Internal by Trailing-Slash Redirect

@astrojs/node Updated 21 Jul 2026

Summary

20/07/2026
Yes i
Low
2.1

CVE-2026-59730: @astrojs/node: Backslash-prefixed paths not recognized as internal by trailing-slash redirect. Affects @astrojs/node versions >= 8.1.0, < 11.0.2. Fixed in 11.0.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @astrojs/node package is a standalone server for serving static files in Astro applications. It is designed to enhance the performance and efficiency of web applications by providing a streamlined way to handle static assets. However, a specific configuration related to trailing slashes can lead to vulnerabilities if not properly managed.

Vulnerability Detail

The vulnerability arises when the trailingSlash option is set to 'always'. In this scenario, the static file handler appends a trailing slash to request paths and issues a 301 redirect. However, paths that begin with a backslash (/) are not recognized as internal paths, causing the handler to return the raw path in the Location header. This can lead to a situation where the redirect resolves to an external host, potentially exposing users to phishing attacks or other malicious activities. Preconditions for this vulnerability include the trailingSlash option being set to 'always', the request path lacking a file extension, and an attacker delivering a crafted link to a user.

How To Fix

Minimum fixed version

11.0.2

This is the first release that contains the fix.

npm install @astrojs/node@11.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can set the trailingSlash option to 'ignore'. This can be done in your configuration file as follows: trailingSlash: 'ignore'. This setting prevents the static file handler from issuing trailing-slash redirects, thereby mitigating the risk associated with this vulnerability.

Conclusion

In summary, the CVE-2026-59730 vulnerability in the @astrojs/node package can lead to serious security risks if the trailingSlash option is set to 'always'. It is crucial to update to the patched version or implement the recommended workaround to protect your application from potential exploits.

See every vulnerability recorded for @astrojs/node →

Share this vulnerability

FAQ

The vulnerability can lead to unintended redirects to external hosts, potentially exposing users to phishing attacks.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If you cannot update the package right away, consider using the workaround of setting trailingSlash to 'ignore' to mitigate the risk.

Yes, Vulert can monitor your project for open-source vulnerabilities in real-time using just the package-lock.json file.

The CVSS score of this vulnerability is 2.1, indicating a low severity level.

Related vulnerabilities

Recent vulnerabilities recorded for @astrojs/node.

How To Fix

Minimum fixed version

11.0.2

This is the first release that contains the fix.

npm install @astrojs/node@11.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback