Skip to content
Smuggling / CRLF Advisory Advanced CVE-2026-7969

Integer overflow in Network (CVE-2026-7969)

An integer overflow when summing the sizes of multi-element upload bodies allows a compromised renderer to make the Content-Length header wrap to a small value while sending a larger body. This can be used to smuggle HTTP requests and bypass Network Service checks such as CORS and PNA.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 38 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: An integer overflow exists when summing the sizes of multi-element upload bodies in ElementsUploadDataStream::InitElements. This allows a compromised renderer to provide an extremely large size via Mojo, causing the Content-Length header to wrap to a small value while still transmitting a large, attacker-controlled request body. This discrepancy can be exploited to smuggle HTTP requests and bypass Network Service security checks like CORS and PNA.

Affected files:

  • net/base/elements_upload_data_stream.cc
  • net/base/upload_data_stream.cc
  • services/network/data_pipe_element_reader.cc
  • net/http/http_stream_parser.cc
  • net/http/http_network_transaction.cc
  • services/network/url_loader_util.cc

Estimated timestamp from git blame: 2025-03-13

Description

There is a potential integer overflow vulnerability in net::ElementsUploadDataStream when calculating the total size of an HTTP request body composed of multiple elements (e.g., when a renderer provides multiple data pipes for an upload). This overflow can lead to HTTP/1.1 Request Smuggling.

Detailed Analysis

When a request body contains multiple elements, ElementsUploadDataStream::InitElements (net/base/elements_upload_data_stream.cc) calculates the total size by summing the Content-Length of each element into a uint64_t variable without any overflow checks:

C++
  uint64_t total_size = 0;
  for (const std::unique_ptr<UploadElementReader>& it : element_readers_) {
    total_size += it->GetContentLength();
  }
  SetSize(total_size);

A compromised renderer can supply multiple kDataPipe elements. The size of each element is determined by the DataPipeGetter::Read Mojo callback. In DataPipeElementReader::ReadCallback (services/network/data_pipe_element_reader.cc), the size provided by the renderer is assigned directly to size_ without validation.

By providing two or more elements with sizes that sum to a value exceeding UINT64_MAX (e.g., UINT64_MAX - 50 and 151), the total_size wraps around to a small value (e.g., 100).

When the request is constructed in net::HttpNetworkTransaction::BuildRequestHeaders, the wrapped total_size (100) is used to emit the Content-Length header. Concurrently, the network service sets Connection: keep-alive for HTTP/1.1 requests.

In UploadDataStream::OnReadCompleted (net/base/upload_data_stream.cc), the logic for determining the end of the stream relies on an exact match between the current_position_ and the total_size_:

C++
    if (!is_chunked_) {
      DCHECK_LE(current_position_, total_size_);
      if (current_position_ == total_size_)
        is_eof_ = true;
    }

The DCHECK_LE is compiled out in release builds. When HttpStreamParser calls Read on the upload stream, DataPipeElementReader::ReadInternal reads up to the buffer size (16KB) from the Mojo pipe. It does not restrict the read to BytesRemaining().

If the renderer writes more bytes into the pipe than the wrapped total_size_ (e.g., 1100 bytes), current_position_ will overshoot total_size_. Consequently, is_eof_ will never be set to true, and HttpStreamParser will write the full 1100 bytes to the socket.

The server receives the request, reads the first 100 bytes (matching the Content-Length), and treats the remaining 1000 bytes as a subsequent, smuggled HTTP request on the keep-alive connection.

Potential Attacker Steps

(Note: These are suggested steps; we do not currently have a working proof of concept that has been successfully run).

  1. Compromise a renderer process.
  2. Create a malicious network::ResourceRequestBody containing multiple DataElementDataPipe elements.
  3. Implement the network::mojom::DataPipeGetter interface to return maliciously large size values via the Read callback, ensuring their sum overflows a 64-bit integer to a small value (e.g., 100).
  4. Initiate a network request (e.g., via fetch) using the crafted request body.
  5. When the Network Service reads from the data pipes, provide the initial 100 bytes of valid body data, followed immediately by a raw, perfectly formed smuggled HTTP request (e.g., GET /admin HTTP/1.1\r\nHost: target.internal\r\n\r\n).
  6. The Network Service will send the undersized Content-Length header followed by the entire payload, bypassing CORS and PNA checks.

Suggested Fix

  1. Use base::CheckedNumeric to prevent integer overflows when summing element sizes in ElementsUploadDataStream::InitElements. Return an error (e.g., ERR_FILE_TOO_BIG or ERR_INVALID_ARGUMENT) if an overflow occurs.
  2. Harden UploadDataStream::OnReadCompleted by changing the exact equality check to a greater-than-or-equal check (e.g., if (current_position_ >= total_size_)), or by explicitly handling the overshoot condition in release builds to prevent indefinite reads if total_size_ is somehow exceeded.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the total size of multiple upload elements is summed into a 64-bit integer without overflow checks, and the end-of-stream check uses exact equality, so a wrapped small total size lets extra bytes be sent.

Impact

A compromised renderer could smuggle HTTP requests and bypass Network Service security checks like CORS and PNA, though no working proof of concept has been run.

What the attacker needed

Compromised renderer process; ability to supply multiple data pipe elements

The fix

The text suggests using checked arithmetic to prevent overflow when summing element sizes and hardening the end-of-stream check to handle overshoot; it does not state that a fix was applied.

How it was found

  1. Compromise a renderer process.
  2. Create a request body with multiple data pipe elements.
  3. Make the data pipe getter return sizes that overflow a 64-bit integer to a small value.
  4. Start a network request using the crafted body.
  5. Provide the first bytes as valid body data, then a raw smuggled HTTP request.
  6. The Network Service sends the undersized Content-Length header followed by the entire payload.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a web page uploads data, the browser tells the server how many bytes to expect using a Content-Length header. If that number is calculated wrongly and becomes too small, extra bytes sent afterwards can be treated by the server as a second, hidden request. Here, a malicious page could trick the browser into doing this, potentially reaching internal services.

What is Smuggling / CRLF?

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.