Insufficient validation of untrusted input in Network (CVE-2026-11223)
The header safety check in Chrome's network service blocked Host and Proxy-* headers but not Origin or Sec-* headers, so a compromised renderer could forge them through modified_headers on redirects. This let an attacker defeat server-side CSRF checks that rely on Origin and Fetch Metadata isolation policies that rely on Sec-Fetch-Site.
- Fix shipped in 2 months
Report description
AreRequestHeadersSafe() missing Origin and Sec-* prefix blocking — compromised renderer forges Origin and Sec-Fetch-* headers via modified_headers in FollowRedirect
Bug location
Where do you want to report your vulnerability?
Chrome VRP – Report security issues affecting the Chrome browser. See program rules
Which URL (or repository) have you found the vulnerability in?
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/cpp/header_util.cc
The problem
Please describe the technical details of the vulnerability
IsRequestHeaderSafe() in header_util.cc blocks Host and Proxy-* headers but omits Origin and has no Sec- prefix check. A compromised renderer forges Origin and Sec-Fetch-* headers via modified_headers in FollowRedirect(), overwriting values the network service sets on cross-origin redirects.
Vulnerable file: header_util.cc — IsRequestHeaderSafe()
This violates docs/security/compromised-renderers.md: "Compromised renderers shouldn't be able to control security sensitive HTTP request headers like Host, Origin, or Sec-Fetch-Site."
On redirect: redirect_util.cc:87 sets Origin: null, then MergeFrom(modified_headers) at line 93 overwrites it. SetFetchMetadataHeaders writes correct Sec-Fetch-* before modified_headers overwrite them.
Additionally, SetSecFetchModeHeader in sec_header_helpers.cc:173 uses SetHeaderIfMissing, so a renderer-set Sec-Fetch-Mode persists on the initial request without any redirect.
Steps to reproduce:
- Check out stable tag:
git checkout 146.0.7680.154 git apply poc_patch.diffautoninja -C out/Default chrome- Start PoC servers:
python3 serve.py - Launch patched Chrome:
out/Default/Chromium.app/Contents/MacOS/Chromium --user-data-dir=/tmp/hdr1-test http://localhost:8080/
- Click "Run Both" — observe forged headers in the server terminal:
Origin: http://127.0.0.1:8081(should benullon cross-origin redirect)Sec-Fetch-Site: same-origin(should becross-site)
The renderer patch injects forged Origin and Sec-Fetch-* into modified_headers during ResourceLoader::WillFollowRedirect() on cross-origin redirects. No flags needed.
Bisect:
Introducing commit: eb88b44f8e655 — Matt Menke, 2019-06-18, M77. Created kUnsafeHeaders blocklist without Origin or Sec- prefix. Parent commit has no blocklist. Moved to header_util.cc in 633e7e6277b64.
Affected: M77 through M146 (current stable).
Fix: Add Origin to kUnsafeHeaders and add Sec- prefix check in IsRequestHeaderSafe(), matching the existing Proxy- prefix check. Also change SetSecFetchModeHeader to overwrite=true. Attached as fix.diff.
Impact analysis
The PoC demonstrates two concrete bypasses:
- CSRF bypass: Victim server receives
Origin: http://127.0.0.1:8081(forged to match victim) instead ofnullon a cross-origin POST redirect (307). Server-side CSRF validation that checks Origin is defeated. - Fetch Metadata bypass: Victim server receives
Sec-Fetch-Site: same-origininstead ofcross-site. Server-side resource isolation policies recommended bycompromised-renderers.md(line 96) are defeated.
Variant analysis also found Access-Control-Request-Private-Network and Cookie (when 3P-blocked) are forgeable through the same gap.
The cause
What version of Chrome have you found the security issue in?
146.0.7680.154 (Stable)
Is the security issue related to a crash?
No, it is not related to a crash.
Choose the type of vulnerability
Other
How would you like to be publicly acknowledged for your report?
Tianyi Hu
Context
Chrome's network service is the process that actually puts HTTP requests on the wire. Renderers (the processes that run web content) ask it to fetch resources, and on a redirect the renderer can supply modified_headers that the network service merges into the outgoing request. Because a renderer can be compromised by a browser exploit, the network service is supposed to treat renderer-supplied headers as untrusted and refuse to let the renderer set headers that carry security meaning.
The gatekeeper for that rule is IsRequestHeaderSafe() in services/network/public/cpp/header_util.cc. The report shows that this function blocks Host and Proxy-* headers but does not block Origin and has no check for the Sec- prefix. That gap lets a compromised renderer forge Origin and Sec-Fetch-* headers through modified_headers in FollowRedirect(), overwriting the values the network service itself sets on cross-origin redirects.
The report cites the project's own policy in docs/security/compromised-renderers.md: "Compromised renderers shouldn't be able to control security sensitive HTTP request headers like Host, Origin, or Sec-Fetch-Site." The behaviour described here is a direct violation of that sentence.
Setup
The work was done against the Chrome source tree at the stable tag 146.0.7680.154. The vulnerable file is:
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/cpp/header_util.cc
No special flags are needed to trigger the issue. The researcher built a patched Chrome that simulates a compromised renderer, plus two local PoC servers. The steps given in the report are:
- Check out stable tag:
git checkout 146.0.7680.154 git apply poc_patch.diffautoninja -C out/Default chrome- Start PoC servers:
python3 serve.py - Launch patched Chrome:
out/Default/Chromium.app/Contents/MacOS/Chromium --user-data-dir=/tmp/hdr1-test http://localhost:8080/
- Click "Run Both" and observe the forged headers in the server terminal.
The renderer patch injects forged Origin and Sec-Fetch-* values into modified_headers during ResourceLoader::WillFollowRedirect() on cross-origin redirects. The browser is pointed at http://localhost:8080/, and the forged Origin value shown is http://[redacted]:8081.
Finding it
The function blocks Host and Proxy-*, but Origin is absent and there is no Sec- prefix check. The report notes that server-side CSRF validation checks Origin and that Fetch Metadata headers are used for server-side resource isolation policies.
Tracing the redirect path confirmed the overwrite. In redirect_util.cc:87 the network service sets Origin: null for a cross-origin redirect, and then MergeFrom(modified_headers) at line 93 overwrites it with whatever the renderer supplied. In the same way, SetFetchMetadataHeaders writes the correct Sec-Fetch-* values before modified_headers overwrite them.
A second, independent path was found: SetSecFetchModeHeader in sec_header_helpers.cc:173 uses SetHeaderIfMissing, so a renderer-set Sec-Fetch-Mode persists on the initial request even without any redirect.
A bisect placed the introduction at commit eb88b44f8e655 (Matt Menke, 2019-06-18, M77), which created the kUnsafeHeaders blocklist without Origin or a Sec- prefix. The parent commit has no blocklist at all. The code later moved to header_util.cc in 633e7e6277b64. The affected range is M77 through M146, the current stable at the time of the report.
Exploitation
Step 1: build a renderer that forges headers
The PoC patch modifies the renderer so that, during ResourceLoader::WillFollowRedirect() on a cross-origin redirect, it injects forged Origin and Sec-Fetch-* values into modified_headers. This models a renderer that an attacker already controls through some other bug. No command-line flags are required.
Step 2: serve the pages
python3 serve.py starts the PoC servers, and the browser is pointed at http://localhost:8080/.
Step 3: trigger the redirect and read the server log
Clicking "Run Both" causes the renderer to follow a cross-origin redirect to the victim server. The server terminal shows the forged values:
Origin: http://[redacted]:8081
Sec-Fetch-Site: same-origin
Both are wrong. On a cross-origin redirect the network service should have sent Origin: null, and the Fetch Metadata value should have been cross-site. Instead the renderer's values survived the merge.
Root cause
IsRequestHeaderSafe() is the check the report focuses on. Its blocklist covers Host and Proxy-* but not Origin, and it has no prefix rule for Sec-. Because MergeFrom(modified_headers) runs after the network service has set Origin: null and the Sec-Fetch-* values, the renderer's copies win.
The SetHeaderIfMissing behaviour in SetSecFetchModeHeader is a separate weakness: even on the initial request, with no redirect involved, a renderer-set Sec-Fetch-Mode is kept because the network service only fills the header in when it is absent.
The kUnsafeHeaders blocklist did not stop this because it was created without Origin or a Sec- prefix rule. The policy document already stated the intended rule; the code simply did not implement it for these headers.
Impact
The report demonstrates two concrete bypasses, both requiring a compromised renderer:
- CSRF bypass. On a cross-origin POST redirect (307), the victim server receives
Origin: http://[redacted]:8081, forged to match the victim, instead ofnull. Server-side CSRF validation that checksOriginis defeated. - Fetch Metadata bypass. The victim server receives
Sec-Fetch-Site: same-origininstead ofcross-site. Server-side resource isolation policies recommended incompromised-renderers.md(line 96) are defeated.
Variant analysis also found that Access-Control-Request-Private-Network and Cookie (when third-party cookies are blocked) are forgeable through the same gap.
The precondition is significant: the attacker must already control the renderer. The value of the bug is that it lets that control cross a trust boundary the browser is supposed to enforce, reaching servers whose defences assume the browser will not lie about Origin or Fetch Metadata.
Fix
The report proposes adding Origin to kUnsafeHeaders and adding a Sec- prefix check in IsRequestHeaderSafe(), matching the existing Proxy- prefix check. It also proposes changing SetSecFetchModeHeader to use overwrite=true. The proposed fix was attached as fix.diff.
Variants to test
- Other security-relevant headers. Variant analysis found
Access-Control-Request-Private-NetworkandCookie(when third-party cookies are blocked) are forgeable through the same gap. A positive result is the victim server logging the renderer's value rather than the browser's. - Other
SetHeaderIfMissingcall sites. Look for Fetch Metadata or security headers written with a fill-if-missing helper. A positive result is a renderer-supplied value surviving on an initial request with no redirect. - Other redirect merge paths. Audit any code that merges renderer-supplied headers after the network service has set its own. A positive result is a network-service value being replaced by the renderer's copy.
- Prefix-based blocklists elsewhere. Where a blocklist uses a prefix rule (like
Proxy-), check whether sibling prefixes such asSec-are covered. A positive result is a header in the unprotected prefix reaching the server with the renderer's value.
What happened, in plain words
A browser is not one program. Chrome splits itself into several processes that talk to each other. The one that runs the web page you are looking at is called a renderer. The one that actually sends requests out to the internet is called the network service. This split exists so that if a web page manages to break out of its sandbox and take over the renderer, the damage is contained: the attacker still does not automatically get to control the network service.
Because of that, the network service is supposed to treat anything the renderer tells it with suspicion. In particular, there is a short list of HTTP request headers that carry security meaning, and the renderer must not be allowed to set them. The report found that this list was incomplete: two important families of headers, Origin and anything starting with Sec-, were not on it. A renderer that an attacker already controls could therefore slip fake values for those headers into a request, and the network service would pass them on to the server as if they were genuine.
That matters because servers use those headers to make security decisions. If a server believes the browser when it says where a request came from, and the browser is lying, the server's defences can be defeated.
Background: the pieces involved
Before the details, here are the concepts the report leans on.
- HTTP request headers. When your browser asks a server for something, it sends a small block of text called a request. Alongside the address it wants, it includes labelled lines called headers, such as
Host(which site is being asked) orCookie(which session you are logged in with). Think of a posted letter: the envelope has the address, and the headers are the extra notes written on it, like "fragile" or "return to sender". - Origin. A header that tells the server which site the request is coming from, for example
https://example.com. Browsers and servers use it to decide whether a request is allowed. Two pages count as the same origin only if the scheme (http or https), the host name and the port all match. - Cross-origin. A request from one origin to a different one. For example, a page served from
localhost:8080talking to a server on[redacted]:8081is cross-origin, because the host and port differ. - Redirect. When a server answers "not here, look over there" and the browser automatically follows to a new address. On a cross-origin redirect the browser deliberately blanks the
Originheader tonull, so the destination cannot be tricked into thinking the request came from itself. - Fetch Metadata. A set of headers beginning with
Sec-Fetch-that modern browsers attach to requests. They describe the context of the request, for exampleSec-Fetch-Site: cross-sitemeaning "this request is going to a different site". Servers can use them to block requests that look suspicious. The report refers toSec-Fetch-SiteandSec-Fetch-Mode. - CSRF (Cross-Site Request Forgery). An attack where a malicious site causes your browser to send a request to another site where you are logged in, hoping the target treats it as a legitimate action by you. A common defence is for the server to check the
Originheader. If an attacker can forgeOrigin, that defence fails. - Compromised renderer. A renderer process that an attacker has already taken over, usually through some other bug. The whole point of the browser's internal design is to limit what a compromised renderer can do. This report is about one limit that was not being enforced.
- Blocklist. A list of things that are forbidden. Here it is a list of header names the renderer is not allowed to set.
- Prefix check. Instead of listing every forbidden name one by one, you can forbid any name that starts with a given string. Forbidding the prefix
Proxy-blocksProxy-Authorization,Proxy-Fooand so on in one rule. - Bisect. A technique for finding which code change introduced a bug, by stepping through the project's history and testing at each point until the behaviour changes.
- Commit. A saved change in a code repository, with an identifier and usually an author and date.
- PoC (proof of concept). A small demonstration that shows a vulnerability is real, rather than just theoretical.
Where the bug lives
The report points at one file in the Chrome source code:
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/cpp/header_util.cc
This is a link into Chrome's public source browser. The file header_util.cc contains small helper functions about HTTP headers. The function at the centre of the report is called IsRequestHeaderSafe(). Its job is to answer one question: is this header safe for the renderer to set? If the answer is no, the network service should drop it.
The report shows that the function blocks Host and any header starting with Proxy-, but it does not block Origin, and it has no rule for the Sec- prefix. So a renderer can set Origin and Sec-Fetch-* headers, and they survive.
The policy the code was supposed to follow
Chrome keeps a document in its source tree, docs/security/compromised-renderers.md, that spells out what a compromised renderer must not be able to do. The report quotes it:
Compromised renderers shouldn't be able to control security sensitive HTTP request headers like
Host,Origin, orSec-Fetch-Site.
That sentence is the intended rule. The code did not implement it for Origin or for the Sec- family, which is why the report describes the behaviour as a direct violation of the project's own policy.
How the overwrite happens
There are two separate paths described.
Path 1: the redirect merge
When a redirect is followed, the renderer can hand the network service a set of extra headers called modified_headers. The network service merges them into the outgoing request. The report traces the order of operations in redirect_util.cc:
- At line 87, the network service sets
Origin: nullfor a cross-origin redirect. This is the correct, safe value. - At line 93,
MergeFrom(modified_headers)runs and overwrites that value with whatever the renderer supplied.
The same thing happens to the Fetch Metadata headers: SetFetchMetadataHeaders writes the correct Sec-Fetch-* values first, and then modified_headers overwrite them. The safe value is written, then replaced.
Path 2: the fill-if-missing helper
A second, independent weakness was found in SetSecFetchModeHeader in sec_header_helpers.cc at line 173. That function uses a helper called SetHeaderIfMissing, which only writes the header if it is not already there. So if the renderer has already set Sec-Fetch-Mode, the network service leaves it alone. No redirect is needed for this one: the forged value persists on the initial request.
Setting up the test
The work was done against the Chrome source tree at the stable tag 146.0.7680.154. A tag is a named point in the project's history, here marking a particular released version. The researcher built a modified Chrome that simulates a compromised renderer, plus two small local servers. The steps in the report are:
- Check out stable tag:
git checkout 146.0.7680.154 git apply poc_patch.diffautoninja -C out/Default chrome- Start PoC servers:
python3 serve.py - Launch patched Chrome:
out/Default/Chromium.app/Contents/MacOS/Chromium --user-data-dir=/tmp/hdr1-test http://localhost:8080/
- Click "Run Both" and observe the forged headers in the server terminal.
What each step is for:
git checkoutswitches the local copy of the source code to the exact released version, so the test is reproducible.git applyapplies a patch file,poc_patch.diff. This patch changes the renderer so that it behaves like one an attacker controls: it injects forgedOriginandSec-Fetch-*values intomodified_headersduringResourceLoader::WillFollowRedirect()on cross-origin redirects. In other words, the patch is the stand-in for the attacker.autoninjais Chrome's build tool. It compiles the modified source into a runnable browser.python3 serve.pystarts the PoC servers.- This launches the freshly built browser with a throwaway profile directory (
--user-data-dir=/tmp/hdr1-test) and opens the test page athttp://localhost:8080/. - Clicking the button triggers the redirect. The server terminal then shows what headers actually arrived.
The browser is pointed at http://localhost:8080/, and the forged Origin value shown is http://[redacted]:8081. No command-line flags are needed to trigger the issue.
What the server saw
After clicking "Run Both", the server terminal printed:
Origin: http://[redacted]:8081
Sec-Fetch-Site: same-origin
Both values are wrong for a cross-origin redirect:
Originshould have beennull, because the browser blanks it when redirecting to a different origin. Instead it shows the victim's own address, which is exactly the value a server-side CSRF check would accept.Sec-Fetch-Siteshould have beencross-site, because the request crossed from one origin to another. Instead it sayssame-origin, which tells the server the request came from its own site.
The renderer's forged values survived the merge and reached the server.
Finding the cause in history
A bisect placed the introduction of the incomplete blocklist at commit eb88b44f8e655, authored by Matt Menke on 2019-06-18, in the M77 release. That commit created the kUnsafeHeaders blocklist without Origin and without a Sec- prefix rule. The commit immediately before it had no blocklist at all. The code later moved to header_util.cc in commit 633e7e6277b64. The affected range is M77 through M146, which was the current stable version when the report was written.
In plain terms: the guard was added in M77 without Origin or a Sec- prefix rule, and the gap remained through M146.
Why it matters
The report demonstrates two concrete bypasses. Both require that the attacker already controls the renderer.
- CSRF bypass. On a cross-origin POST redirect (status 307, which preserves the request method and body), the victim server receives
Origin: http://[redacted]:8081, forged to match the victim, instead ofnull. Any server-side CSRF validation that checksOriginis defeated, because the check sees the value it wants to see. - Fetch Metadata bypass. The victim server receives
Sec-Fetch-Site: same-origininstead ofcross-site. Server-side resource isolation policies recommended incompromised-renderers.mdat line 96 are defeated, because the server is told the request is local when it is not.
Variant analysis also found that Access-Control-Request-Private-Network and Cookie (when third-party cookies are blocked) can be forged through the same gap.
The precondition is significant: the attacker must already have taken over the renderer. The value of the bug is that it lets that control cross a trust boundary the browser is supposed to enforce. Servers whose defences assume the browser will not lie about Origin or Fetch Metadata can be reached with false information.
The fix
The report proposes three changes:
- Add
OrigintokUnsafeHeaders. - Add a
Sec-prefix check inIsRequestHeaderSafe(), matching the existingProxy-prefix check. - Change
SetSecFetchModeHeaderto useoverwrite=true, so the network service always writes its own value rather than leaving a renderer-supplied one in place.
The changes were attached to the report as fix.diff.
Other places to look
Variant analysis found two further headers forgeable through the same gap:
- Other security-relevant headers. Variant analysis found
Access-Control-Request-Private-NetworkandCookie(when third-party cookies are blocked) are forgeable through the same gap. A positive result is the victim server logging the renderer's value rather than the browser's. - Other
SetHeaderIfMissingcall sites. Look for Fetch Metadata or security headers written with a fill-if-missing helper. A positive result is a renderer-supplied value surviving on an initial request with no redirect. - Other redirect merge paths. Audit any code that merges renderer-supplied headers after the network service has set its own. A positive result is a network-service value being replaced by the renderer's copy.
- Prefix-based blocklists elsewhere. Where a blocklist uses a prefix rule (like
Proxy-), check whether sibling prefixes such asSec-are covered. A positive result is a header in the unprotected prefix reaching the server with the renderer's value.
Glossary
- API: a defined way for one piece of software to ask another to do something, like a menu of allowed requests.
- Bisect: finding the change that introduced a bug by testing points in the project's history until the behaviour changes.
- Blocklist: a list of names or values that are forbidden.
- Commit: a saved change in a code repository, identified by a hash, with an author and date.
- Compromised renderer: a renderer process that an attacker has already taken over.
- Cookie: a small piece of data a site stores in your browser and sends back with each request, often used to keep you logged in.
- Cross-origin: a request from one origin to a different one, where scheme, host or port differ.
- CSRF (Cross-Site Request Forgery): tricking a logged-in user's browser into sending an unwanted request to another site.
- Fetch Metadata: headers beginning with
Sec-Fetch-that describe the context of a request, such as whether it is cross-site. - Header: a labelled line in an HTTP request or response carrying extra information, such as
HostorOrigin. - HTTP: the protocol browsers and servers use to exchange requests and responses.
- Merge: combining two sets of headers, where later values can replace earlier ones.
- Network service: the Chrome process that actually sends HTTP requests over the network.
- Origin: the combination of scheme, host and port that identifies where a request comes from.
- PoC (proof of concept): a small demonstration showing a vulnerability is real.
- Prefix check: a rule that forbids any name starting with a given string, rather than listing each name.
- Redirect: a server response telling the browser to go to a different address instead.
- Renderer: the Chrome process that runs web page content.
- Sandbox: an isolation mechanism that limits what a process can do if it is compromised.
- Tag: a named point in a code repository's history, often marking a release.
- Third-party cookie: a cookie set by a site other than the one you are visiting, often used for tracking and frequently blocked.
- Trust boundary: a line between two parts of a system where one part is not trusted by the other, and checks are enforced at the crossing.
- Variant analysis: looking for other places where the same kind of mistake might exist.