Improper input validation in Network (CVE-2026-79065)
The Network Service only blocked the exact value 'Upgrade' in the Connection header, so a compromised renderer could set any other value. An attacker could then use hop-by-hop header stripping on an HTTP/1.1 intermediary to remove security-critical headers such as X-Forwarded-For, potentially bypassing IP allowlists on credentialed cross-origin requests.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team.
Overview: A compromised renderer can specify arbitrary values in the Connection header because the Network Service's safety check only blocks the value Upgrade. This allows an attacker to exploit hop-by-hop header stripping on HTTP/1.1 intermediaries, potentially bypassing security controls like IP allowlists on credentialed cross-origin requests.
Affected files:
services/network/public/cpp/header_util.ccnet/http/http_network_transaction.ccnet/http/http_stream_parser.ccservices/network/cors/cors_url_loader_factory.ccservices/network/cors/cors_url_loader.ccservices/network/url_loader.ccservices/network/url_loader_util.ccservices/network/public/cpp/http_request_headers_mojom_traits.cc
Estimated timestamp from git blame: 2019-10-08
Summary
The Network Service uses network::AreRequestHeadersSafe (services/network/public/cpp/header_util.cc) to validate HTTP headers sent by a renderer process. However, the Connection header is not present in the kUnsafeHeaders list. Instead, it is only checked in kUnsafeHeaderValues for the exact, case-insensitive string "Upgrade".
Because any other value is permitted, a compromised renderer can send a custom Connection header (e.g., Connection: X-Forwarded-For). According to RFC 7230 §6.1, compliant intermediaries must treat any header listed in the Connection header as a hop-by-hop header and strip it before forwarding the request. This allows an attacker to forcefully strip security-critical headers (like X-Forwarded-For, X-Real-IP, or internal authentication tokens) on requests targeting victim sites over HTTP/1.1.
Technical Details
- Validation Gap: In
services/network/public/cpp/header_util.cc,IsRequestHeaderSafeallows theConnectionheader as long as the value is not "Upgrade". - CORS Preflight Bypass:
Connectionis defined as a forbidden header bynet::HttpUtil::IsSafeHeader. Consequently,CorsUnsafeNotForbiddenRequestHeaderNames(services/network/cors/cors_util.cc) ignores it, meaning the customConnectionheader does not trigger a CORS preflight. - Header Overwriting: In
net::HttpNetworkTransaction::BuildRequestHeaders(net/http/http_network_transaction.cc), a defaultConnection: keep-aliveis set. Later in the same method,request_headers_.MergeFrom(request_->extra_headers)is called. This finds the existingConnectionheader and overwrites it with the attacker's value. - Verbatim Serialization: For HTTP/1.1,
net::HttpStreamParser::SendRequestserializes the headers verbatim, sending the attacker-controlledConnectionheader over the wire.
Potential Reproduction Steps
Note: These are potential steps based on code analysis; a working proof-of-concept has not been executed.
- Gain arbitrary code execution in a renderer process.
- Obtain a valid
network::mojom::URLLoaderFactory(e.g., the frame's subresource factory). - Construct a
network::ResourceRequesttargetinghttps://victim.example/(reached over HTTP/1.1). - Set
credentials_modetokIncludeto attach the user's cookies for the victim site. - Inject the custom header into
request.headers, e.g.,{"Connection": "X-Forwarded-For"}. - Invoke
factory->CreateLoaderAndStart()via Mojo. - The Network Service merges the header, overwriting the default
keep-alive, and sends it to the victim site without a CORS preflight. - An RFC-compliant intermediary in front of the victim site processes the request, sees
Connection: X-Forwarded-For, and strips theX-Forwarded-Forheader before forwarding it to the backend.
Suggested Fix
The Connection header should be completely blocked from being set by untrusted callers, aligning with the Fetch specification's forbidden header names. Move net::HttpRequestHeaders::kConnection from kUnsafeHeaderValues to the kUnsafeHeaders list in services/network/public/cpp/header_util.cc.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results 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.
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
The Connection header was not in the list of completely forbidden headers; it was only checked for the exact value 'Upgrade', so any other value was allowed.
Impact
A compromised renderer could potentially bypass security controls such as IP allowlists on credentialed cross-origin requests, but only if an RFC-compliant HTTP/1.1 intermediary sits in front of the victim site; no working proof-of-concept was executed.
What the attacker needed
Compromised renderer process; victim site reached over HTTP/1.1; RFC-compliant intermediary in front of victim; user has cookies for the victim site
The fix
The Connection header should be completely blocked from being set by untrusted callers by moving it to the kUnsafeHeaders list.
How it was found
- Gain arbitrary code execution in a renderer process.
- Obtain a valid network::mojom::URLLoaderFactory.
- Construct a network::ResourceRequest targeting a victim site over HTTP/1.1.
- Set credentials_mode to kInclude to attach the user's cookies.
- Inject a custom Connection header into request.headers.
- Invoke factory->CreateLoaderAndStart() via Mojo.
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 browser sends a request, it includes headers, which are small pieces of information about the request. Some headers are meant to be controlled only by the browser, not by a web page. Here, the browser's network component allowed a web page (if it had already been compromised) to set a header called Connection, which tells intermediaries to remove other headers. That could let an attacker strip away security checks like IP allowlists.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.