CVE-2026-128121 in SvelteKit
Summary
by MITRE • 11/13/2026
SvelteKit is a framework for rapidly developing robust, performant web applications using Svelte. Prior to @sveltejs/adapter-vercel 6.3.5 and 7.0.2 and @sveltejs/adapter-static 3.0.11 and 4.0.1, an attacker-influenced link crawled during prerendering could be emitted into the generated Vercel routing configuration without escaping regular-expression metacharacters. The configuration could consequently interpret the path as regular-expression syntax, match unintended application paths, and expose content or behavior outside the intended path. This issue is fixed in @sveltejs/adapter-vercel 6.3.5 and 7.0.2 and @sveltejs/adapter-static 3.0.11 and 4.0.1.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/13/2026
The vulnerability identified involves a regular expression injection flaw within the SvelteKit ecosystem, specifically affecting the Vercel and static adapters prior to their respective patched versions. This security issue arises during the prerendering phase of application build processes, where the framework generates routing configurations for deployment targets such as Vercel or static hosting environments. The core technical flaw lies in the failure to properly escape regular-expression metacharacters when processing user-influenced links that are crawled and included in these generated configuration files. Because the path strings derived from external inputs are inserted directly into regex patterns without sanitization, an attacker who can influence the content of linked pages or metadata during the build process can inject special characters such as dots, asterisks, plus signs, or parentheses. These characters alter the semantic meaning of the regular expression used to match incoming requests against defined routes.
From a technical perspective, this flaw allows for path traversal-like behavior through regex manipulation rather than traditional file system access. When an unescaped metacharacter is present in the generated route pattern, it can broaden the scope of matches beyond the intended specific paths. For instance, injecting a wildcard character might cause the router to match against unintended application endpoints that were not originally exposed or protected by authentication checks. This misconfiguration effectively bypasses access controls and routing restrictions designed into the application architecture. The operational impact is significant as it enables unauthorized data exposure or execution of sensitive behaviors on pages that should remain inaccessible, potentially leading to information disclosure, privilege escalation within the context of the web application, or further exploitation depending on the functionality exposed by the matched routes.
This vulnerability aligns with CWE-184, which covers incomplete list of input validation, and more specifically CWE-730, which addresses injection flaws involving regular expressions where user-controlled data is not properly sanitized before being used in pattern matching logic. In terms of adversary tactics, this flaw facilitates the ATT&CK technique T1190, Exploit Public-Facing Application, by allowing an attacker to leverage a misconfigured routing rule to access restricted resources without needing to exploit a separate software bug or bypass authentication mechanisms directly. The attack vector is primarily remote and requires the ability to influence content that gets crawled during the build process, which may involve compromising linked third-party sites or manipulating internal site structure if cross-site scripting vulnerabilities exist elsewhere in the application ecosystem.
Mitigation for this vulnerability involves upgrading to patched versions of the affected adapters immediately. Specifically, users must update sveltejs/adapter-vercel to version 6.3.5 or later (including version 7.0.2 and above) and sveltejs/adapter-static to version 3.0.11 or later (including version 4.0.1 and above). These updates implement proper escaping mechanisms for metacharacters within the generated routing configurations, ensuring that user-influenced paths are treated as literal strings rather than regex patterns unless explicitly intended by the developer. Additionally, developers should review their application's linking strategy during prerendering to minimize reliance on external or untrusted content sources being crawled and embedded into build artifacts. Implementing strict input validation for any data that influences routing logic is also recommended as a defense-in-depth measure to prevent similar injection flaws in other parts of the stack.