CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-84376

CVE-2026-84376: Authorization Bypass via Missing Path-Segment Boundary Validation in Astro

Alon Barad
Alon Barad
Software Engineer

Sep 9, 2026·6 min read·34 visits

Executive Summary (TL;DR)

Astro prior to 7.2.4 allowed attackers to bypass path-based authorization middleware via a partial string matching flaw when stripping custom base paths (e.g., /appX/admin resolved to /app/admin but bypassed middleware looking for /app/admin).

An authorization bypass vulnerability exists in the Astro web framework prior to version 7.2.4. When configured with a non-root base path, Astro's routing engine stripped the base path from incoming request URLs using an insecure prefix-match check without verifying path-segment boundaries. This created a path parser differential between user-defined middleware and the internal router. An unauthenticated attacker could bypass route-based authorization checks to access administrative or privileged endpoints by altering the path prefix segment.

Vulnerability Overview

Astro is a modern web framework designed for building content-driven websites. To support hosting applications under subpaths, the framework allows developers to define a custom, non-root base path (such as '/app'). When configured, Astro is responsible for routing requests relative to this base while developer-defined middleware manages global application concerns, including route-level authentication and authorization.

A flaw exists in Astro's path-handling subsystem prior to version 7.2.4. When parsing incoming HTTP request pathnames, the routing mechanism incorrectly evaluates and strips the base path using a simple prefix match without verifying path-segment boundaries. This implementation defect introduces a critical parser differential between the framework's internal routing engine and standard authorization middleware.

The vulnerability is classified as CWE-187 (Partial String Comparison). It represents a significant class of routing-related security flaws where inconsistent interpretations of a resource path between different security boundaries permit unauthorized access to protected components without authentication.

Root Cause Analysis

The root cause lies in how Astro's routing modules (such as BaseApp.removeBase, FetchState.#computePathname, and match-request.ts) stripped the configured base prefix from incoming request paths. To determine if an incoming request path fell under the configured base, the engine used a basic string comparison. Specifically, it checked if the requested pathname started with the base string via the JavaScript .startsWith() function.

When a base of '/app' was configured, a request for '/appX/admin' (where 'X' represents an arbitrary trailing character) successfully matched the .startsWith('/app') condition. Upon evaluating this condition as true, the router stripped the base path. It achieved this by calculating the length of the base path plus one character (to account for the expected slash delimiter) and slicing the original string from that index forward.

Applying this calculation to the path '/appX/admin' resulted in a slice operations of pathname.slice(5). This operation sliced off the prefix '/appX' and resolved the remaining path internally to '/admin'. Consequently, Astro treated the incoming request as a legitimate attempt to access the internal '/admin' route, completely ignoring the boundary mismatch of the '/appX' segment.

Architectural Inconsistency

The security impact of this vulnerability manifests because of how request objects are processed by middleware versus how they are matched by the internal router. Security middleware generally acts as an interceptor. It evaluates the raw, unmodified URL of the request as exposed by context.url.pathname to determine whether the client is authorized to access the requested resource.

When an attacker sends a request to '/appX/admin', the middleware inspects context.url.pathname and detects '/appX/admin'. Because this pathname does not match the protected pattern of '/app/admin' or start with '/app/admin/', the middleware permits the request to pass. The middleware acts under the assumption that the path refers to an unprivileged route.

However, once the middleware passes execution to the core framework, the router processes the URL using the flawed prefix-stripping routine. The path '/appX/admin' is stripped down to '/admin', which matches the internal protected page component. The core routing engine then renders the protected page and returns it to the client, successfully bypassing the access control boundary. This interaction is illustrated in the following diagram:

Exploitation Methodology

Exploiting this vulnerability requires specific application conditions. First, the application must be configured with a non-root base path, such as /app. Second, the application must implement middleware that enforces access control on routes by performing prefix or equality checks against context.url.pathname. Finally, the application must host protected routes under that same base path.

To initiate the exploit, an attacker crafts an HTTP request where the base path is concatenated with an arbitrary suffix character, immediately followed by the target route segment. For example, if the application base is /app and the target is /app/admin, the attacker sends a request to /app-admin or /appX/admin over the network.

Because the string /appX/admin begins with the prefix /app, Astro's router strips the prefix and resolves the request to the administrative controller. The authorization middleware, examining the full pathname, fails to detect that the request is targeting a restricted route because it does not match the expected pattern. This allows unauthenticated users to perform privileged administrative actions.

Patch Analysis and Code Walkthrough

To resolve this vulnerability, Astro's engineering team consolidated the path parsing logic into a robust helper function called stripRequestBase inside packages/internal-helpers/src/path.ts. This helper function completely eliminates naive prefix checking by enforcing strict path-segment boundary validation.

export function stripRequestBase(pathname: string, base: string): string {
  // 1. Collapse duplicate leading slashes to prevent multi-slash bypasses
  pathname = collapseDuplicateLeadingSlashes(pathname);
  const baseWithoutTrailingSlash = removeTrailingForwardSlash(base);
 
  // 2. Perform exact match check
  if (pathname === baseWithoutTrailingSlash) {
    return '/';
  }
 
  // 3. Enforce path-segment boundary by appending a slash separator
  if (pathname.startsWith(baseWithoutTrailingSlash + '/')) {
    return pathname.slice(baseWithoutTrailingSlash.length);
  }
 
  // 4. Return unmodified path if segment boundary is not met
  return pathname;
}

By verifying that the base path is followed immediately by a slash character (baseWithoutTrailingSlash + '/'), the patched code ensures that arbitrary suffixes like /appX do not trigger the slicing logic. Under the new implementation, a request to /appX/admin will fail the boundary check. The framework will return the unmodified path /appX/admin, leading to a safe 404 Not Found response instead of exposing the protected endpoint.

Incident Impact and Remediation Guidance

The vulnerability poses a moderate-to-high risk depending on the sensitivity of the protected routes hosted within the Astro application. Because exploiting the vulnerability requires no special privileges or user interaction, an unauthenticated attacker can consistently bypass middleware checks to access confidential data or execute administrative functions if the underlying route handler does not perform secondary authentication.

The primary remediation strategy is upgrading the core Astro dependency to version 7.2.4 or higher. Developers can update their projects using standard package managers. Executing npm install astro@7.2.4 or the equivalent command for your package manager will apply the path parsing fixes across all internal dependencies.

If immediate patching is not possible, developers can implement a temporary mitigation directly in their application's middleware. The middleware must manually validate that any incoming request pathname that starts with the base path also respects the path-segment boundary. Any path matching the prefix but failing the slash boundary check should be rejected immediately with an HTTP 400 Bad Request or 404 Not Found response.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.3/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
EPSS Probability
0.41%
Top 66% most exploited

Affected Systems

Astro web application deployments utilizing a custom, non-root base path and relying on pathname-based authorization middleware.

Affected Versions Detail

Product
Affected Versions
Fixed Version
astro
withastro
< 7.2.47.2.4
AttributeDetail
CWE IDCWE-187 (Partial String Comparison)
Attack VectorNetwork (AV:N)
CVSS Score6.3 (Medium)
EPSS Score0.00407 (Percentile: 33.98%)
ImpactAuthorization Bypass
Exploit StatusPoC available (Unit test validation)
KEV StatusNot Listed in CISA KEV

MITRE ATT&CK Mapping

T1548Abuse Elevation Control Mechanism
Privilege Escalation
T1556Modify Authentication Process
Defense Evasion
CWE-187
Partial String Comparison

The software performs a string comparison associated with a security decision, but it does not compare the entire string or enforce a boundary check, allowing a partial match to succeed.

References & Sources

  • [1]Astro Security Advisory GHSA-376h-93r7-7g6f
  • [2]Astro Fix Pull Request #17701
  • [3]Astro Patch Commit
  • [4]Astro v7.2.4 Release Changelog
  • [5]NVD Vulnerability Details

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•22 minutes ago•CVE-2026-113872
7.5

CVE-2026-113872: Unauthenticated Process Crash in Express Multer via Late Busboy Stream Resumption

CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.

Amit Schendel
Amit Schendel
1 views•12 min read
•about 1 hour ago•CVE-2026-115897
2.1

CVE-2026-115897: Cross-Site Scripting via Function Body Boundary Bypass in serialize-javascript

CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.

Amit Schendel
Amit Schendel
2 views•13 min read
•about 2 hours ago•CVE-2026-109841
5.9

CVE-2026-109841: Subresource Integrity Verification Bypass in Node.js Undici

CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.

Alon Barad
Alon Barad
1 views•9 min read
•about 3 hours ago•CVE-2026-109924
5.9

CVE-2026-109924: Unbounded Memory Allocation in Node.js Undici EventSource Stream Parser

A resource allocation vulnerability (CWE-770) exists in the Server-Sent Events (SSE) parser within the Node.js undici HTTP client library. In affected versions, the EventSourceStream implementation fails to restrict the count of internal Buffer chunk references and accumulated string nodes prior to event dispatch boundaries. A malicious or compromised SSE endpoint can exploit this behavior by streaming fragmented, unterminated lines or continuous sequences of short data fields without empty separator lines, bypassing configured byte-size limits and causing a fatal Out-of-Memory (OOM) crash in the client Node.js process.

Amit Schendel
Amit Schendel
4 views•11 min read
•about 4 hours ago•CVE-2026-109869
7.5

CVE-2026-109869: Denial of Service via Orphaned Stream in Node.js Undici Fetch Implementation

CVE-2026-109869 is a high-severity denial-of-service vulnerability in undici, the default HTTP/1.1 client and Fetch implementation for Node.js. When a server responds with more than five Content-Encoding directives and prematurely closes the connection before transmitting the body, undici allocates an internal Readable stream before enforcing the content-encoding limit. Upon rejecting the fetch promise, the stream is orphaned without an error listener or abort signal, causing the premature socket closure to emit an unhandled stream error that terminates the Node.js process.

Alon Barad
Alon Barad
6 views•10 min read
•about 4 hours ago•CVE-2026-114612
9.9

CVE-2026-114612: Privilege Escalation to Proxy Admin via Cryptographic Context Reuse in LiteLLM

LiteLLM versions 1.87.0 through 1.104.0-rc.1 contain a cryptographic domain separation vulnerability (CWE-269, CWE-345, CWE-441) that allows an authenticated low-privilege user to escalate privileges to full proxy administrator. The application reuses a single symmetric cryptographic context and key derivation path for both at-rest secret encryption and ephemeral UI/CLI session authentication tokens without providing Associated Authenticated Data (AAD). By submitting crafted JSON session claims into user-accessible encrypted metadata fields, an attacker can use the API-key generation flow as an encryption oracle, extract the resulting ciphertext, and replay it as a bearer token to achieve administrative control and subsequent remote command execution via the Model Context Protocol (MCP) stdio interface.

Alon Barad
Alon Barad
8 views•9 min read