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-40073

CVE-2026-40073: Unrestricted Resource Allocation in SvelteKit adapter-node via Chunked Transfer Encoding

Alon Barad
Alon Barad
Software Engineer

Apr 10, 2026·5 min read·68 visits

Executive Summary (TL;DR)

A flaw in SvelteKit allows attackers to bypass BODY_SIZE_LIMIT via chunked transfer encoding, resulting in uncontrolled memory allocation and Denial of Service.

SvelteKit's adapter-node fails to enforce the configured BODY_SIZE_LIMIT for incoming requests utilizing chunked transfer encoding. This logic error allows unauthenticated remote attackers to send arbitrarily large request bodies, bypassing internal framework protections and leading to memory exhaustion and server denial of service.

Vulnerability Overview

SvelteKit utilizes @sveltejs/adapter-node to generate standalone Node.js servers for deploying server-side rendered applications. The framework enforces a BODY_SIZE_LIMIT (defaulting to 512 kilobytes) to prevent excessively large payloads from exhausting server resources during request processing.

A logic vulnerability exists in how the framework parses specific HTTP requests, neutralizing this safeguard. When an incoming request uses chunked transfer encoding, the underlying body parser fails to accurately account for the accumulating payload size against the configured limit.

This bypass allows unauthenticated remote attackers to stream continuous data to the target endpoint. Because the application logic does not terminate the connection when the payload exceeds the limit, the server buffers the entirety of the malicious payload into memory, causing resource exhaustion.

Root Cause Analysis

The vulnerability originates in the get_raw_body function within packages/kit/src/exports/node/index.js. The original implementation relied on the Content-Length HTTP header to determine if an incoming request exceeded the BODY_SIZE_LIMIT parameter.

When an HTTP client uses Transfer-Encoding: chunked, the Content-Length header is omitted by protocol design. The get_raw_body function incorrectly assumed the content_length variable would resolve to a finite numeric value. Instead, the absence of the header caused the parser to assign the variable a value of NaN (Not-a-Number).

The enforcement routine evaluated the accumulated chunk size against the parsed limit using the conditional size > content_length. In the JavaScript specification, any numerical comparison involving NaN strictly evaluates to false. Consequently, the application accepted subsequent data chunks indefinitely, entirely skipping the rejection logic.

Code Analysis

The vulnerable implementation coupled the cumulative size check directly to the protocol-provided Content-Length header. The evaluation failed silently due to type coercion anomalies inherent to JavaScript.

// Vulnerable Logic in get_raw_body
size += chunk.length;
if (size > content_length) {
    // condition evaluates to false when content_length is NaN
    // memory buffer continues to grow without restriction
}

The patch implemented in commit 3202ed6c98f9e8d86bf0c4c7ad0f2e273e5e3b95 introduces a decoupled evaluation sequence. The system now validates the absolute size of the accumulated payload against the configured internal limit independently of the client-supplied HTTP headers.

// Patched Logic in get_raw_body
size += chunk.length;
 
// Primary check against configured application limit
if (body_size_limit !== undefined && size > body_size_limit) {
    cancelled = true;
    const message = `request body size exceeded BODY_SIZE_LIMIT of ${body_size_limit}`;
    const error = new SvelteKitError(413, 'Payload Too Large', message);
    controller.error(error);
    return;
}
 
// Secondary check for HTTP protocol consistency
if (has_content_length && size > content_length) {
    cancelled = true;
    // Reject requests that violate their own declared Content-Length
}

Exploitation Methodology

An attacker initiates the exploit by opening a persistent HTTP connection to a SvelteKit application utilizing adapter-node. The client sends a POST or PUT request with the Transfer-Encoding: chunked header while deliberately omitting the Content-Length header.

The client subsequently streams data blocks to the server. The attacker does not need to send the final zero-length chunk that typically terminates a chunked sequence. Instead, they supply an ongoing sequence of data blocks that rapidly consume the target application's memory pool.

import http from 'node:http';
 
const req = http.request({
  hostname: 'target.example.com',
  port: 443,
  method: 'POST',
  headers: { 'Transfer-Encoding': 'chunked' }
});
 
// Loop to exhaust server memory
setInterval(() => {
  req.write(Buffer.alloc(1024 * 1024, 'A')); 
}, 10);

Impact Assessment

Successful exploitation induces rapid resource exhaustion within the Node.js runtime environment. Because the framework allocates unconstrained memory buffers for incoming data, the application memory footprint grows proportionally to the attacker's transmission rate.

Once the memory usage exceeds the maximum heap size allocated to the V8 JavaScript engine, the process terminates with an Out-Of-Memory (OOM) exception. This event drops all concurrent connections and terminates the application service. If the process is not managed by an automated supervisor, the outage remains persistent.

The vulnerability carries a CVSS v4.0 base score of 8.2 (High). The metric evaluates the attack requirements as present, given the target must utilize adapter-node without external WAF-level payload restrictions. The primary impact maps exclusively to systemic availability.

Mitigation and Remediation

Software engineers must update the @sveltejs/kit dependency to version 2.57.1 or later. Applying this update introduces the decoupled limit verification logic and restores internal protection against anomalous payload sizes.

Organizations should implement defense-in-depth principles by configuring absolute payload limits at the perimeter infrastructure. Administrators must configure reverse proxies, such as Nginx or HAProxy, to enforce connection-level constraints utilizing directives like client_max_body_size.

In environments where immediate patching is unfeasible, operators can mitigate the attack surface by deploying network rules that block unauthenticated requests presenting the Transfer-Encoding: chunked header, provided legitimate client applications do not rely on chunked uploads.

Official Patches

SvelteKitOfficial GitHub Security Advisory
SvelteKitRelease Tag for 2.57.1

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected Systems

SvelteKit frameworkNode.js server applications utilizing @sveltejs/adapter-node

Affected Versions Detail

Product
Affected Versions
Fixed Version
@sveltejs/kit
Svelte
< 2.57.12.57.1
AttributeDetail
CWE IDCWE-770
Attack VectorNetwork
CVSS v4.0 Score8.2 (High)
ImpactDenial of Service
Exploit StatusPoC Available
Affected Component@sveltejs/adapter-node
RemediationUpgrade to 2.57.1

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-770
Allocation of Resources Without Limits or Throttling

The software allocates a resource without imposing a maximum limit on the amount that can be allocated.

Known Exploits & Detection

Internal Test SuiteProof of concept demonstrating bypass of BODY_SIZE_LIMIT via continuous Node.js HTTP request chunks.

Vulnerability Timeline

Initial vulnerability discovery and internal report.
2026-04-08
Fix committed to the sveltejs/kit repository.
2026-04-09
Security advisory published and CVE-2026-40073 assigned.
2026-04-10
Release of @sveltejs/kit version 2.57.1.
2026-04-10

References & Sources

  • [1]GHSA-2crg-3p73-43xp Advisory
  • [2]SvelteKit Mitigation Patch
  • [3]Official CVE Record

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

•1 day ago•CVE-2026-63462
7.5

CVE-2026-63462: Unauthenticated Stack Overflow Denial of Service in Unleash Server

An unauthenticated remote denial of service vulnerability exists in the Unleash feature management platform. By submitting a crafted JSON payload containing deeply nested structures to an OpenAPI-validated endpoint, an attacker can trigger uncontrolled recursion within the error formatting module. This leads to a call-stack exhaustion (RangeError: Maximum call stack size exceeded) inside the Node.js runtime, causing the service to crash immediately without recovery.

Alon Barad
Alon Barad
10 views•6 min read
•1 day ago•CVE-2026-63004
5.5

CVE-2026-63004: Server-Side Request Forgery in Unleash Addon and Integration Subsystem

CVE-2026-63004 is a server-side request forgery (SSRF) vulnerability in the Unleash feature management platform. Authenticated administrators with CREATE_ADDON or UPDATE_ADDON privileges can exploit this vulnerability to initiate requests to loopback addresses, private networks, and cloud metadata endpoints, potentially leading to information disclosure and credential extraction.

Amit Schendel
Amit Schendel
8 views•8 min read
•1 day ago•CVE-2026-63466
4.1

CVE-2026-63466: Process-Wide Security Degradation via Global Module Mutation in Unleash

Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.

Alon Barad
Alon Barad
3 views•6 min read
•1 day ago•CVE-2026-76904
9.8

CVE-2026-76904: Unauthenticated SQL Injection in GeoTools PostGIS DataStore Component

A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.

Alon Barad
Alon Barad
10 views•5 min read
•1 day ago•CVE-2026-61824
8.2

CVE-2026-61824: High-Severity Cross-Site Scripting (XSS) via Unsanitized Site Extractors in Defuddle

CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.

Amit Schendel
Amit Schendel
6 views•7 min read
•1 day ago•CVE-2026-63421
7.5

CVE-2026-63421: Query Limit Bypass via Negative Integer Input in KeystoneJS core resolvers

A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.

Alon Barad
Alon Barad
6 views•6 min read