Date: November 22, 2026 Last Updated: November 22, 2026 Review: Expert & Architecture Review Report
Scope & Licensing Note: This article strictly covers pure open-source systems. Premium, proprietary/vendor-locked, and community-edition (open-core) systems are currently not included.
Modern web browsers act as untrusted code execution engines. Every time you visit a website, your browser downloads and runs JavaScript from servers you do not control.
To stop malicious scripts on evil.com from reading your bank balance on bank.com, browsers enforce strict isolation boundaries centered on CORS, CORB, and ORB—three related mechanisms operating at different layers of the browser stack against different classes of threats.
text/html, text/xml, and application/json payloads from entering renderer memory, mitigating CPU timing side-channels such as Spectre."no-cors" opaque responses at the network layer.To understand CORS, CORB, and ORB, you first need to understand the Same-Origin Policy (SOP).
An origin is defined by three components:
https).example.com).443).Under SOP, a script running on Origin A follows three baseline rules when interacting with Origin B:
<img> or stylesheets via <link>).At the same time, modern web applications depend on legitimate cross-origin connectivity—such as querying weather APIs, loading fonts from CDNs, or rendering avatars from object storage. CORS, CORB, and ORB exist to balance strict isolation with safe cross-origin access.
CORS is a standardized protocol that lets a server selectively relax the Same-Origin Policy. Instead of the browser blindly blocking every cross-origin read, CORS gives the destination server control over which origins may read its responses.
When a web app issues a cross-origin request via fetch() or XMLHttpRequest, the browser automatically attaches an Origin header identifying the caller:
GET /api/user-profile HTTP/1.1
Host: api.example.com
Origin: https://app.example.com
The server inspects the Origin header and, if it trusts the requester, includes Access-Control-Allow-Origin in its response:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: https://app.example.com
Content-Type: application/json
The browser then enforces one of two outcomes:
For non-simple requests, the browser adds a preflight step:
PUT or DELETE, or carrying custom headers.OPTIONS preflight request first to confirm that the server allows the method and headers before transmitting the actual payload.When cross-origin requests carry user credentials (cookies, TLS client certificates, or Authorization headers via credentials: "include"), browsers tighten header rules:
Access-Control-Allow-Credentials: true and echo a single explicit origin in Access-Control-Allow-Origin—a wildcard * is rejected.Vary: Origin): Any server or reverse proxy that dynamically reflects Access-Control-Allow-Origin from an allowlist must include Vary: Origin. Without Vary: Origin, an intermediate CDN or shared cache can store a response generated for Origin A and mistakenly serve those headers to Origin B, causing either cross-origin failures or unintended cache sharing.CORS has an important architectural boundary:
For years, hiding failed CORS responses from JavaScript APIs was considered sufficient. Hardware side-channel attacks broke that assumption.
In 2018, the disclosure of Spectre and Meltdown overturned a core premise of browser isolation:
<img>, <script>, or <iframe> bypass CORS preflights and place responses directly into the page’s renderer process memory.<img src="https://bank.com/api/account-summary.json">. The <img> tag fails to decode the JSON as an image, yet the sensitive JSON bytes already sit in renderer memory, exposed to Spectre extraction.CORB (Cross-Origin Read Blocking) was introduced by Chromium to close this exact gap.
CORB inspects incoming cross-origin responses before they enter the renderer process hosting the web page:
text/html, text/xml, and application/json (along with related MIME variants).As a result, the <img> or <script> tag still fails gracefully as before, while sensitive bytes never touch untrusted process memory.
While CORB closed the primary HTML, XML, and JSON leak vector, its allowlist/blocklist MIME strategy left structural blind spots:
Content-Type headers (text/plain or application/octet-stream), and media byte-range responses could occasionally slip past CORB’s rules.When a cross-origin request runs in "no-cors" mode (such as via <img>, <script>, <audio>, or <video>), the browser receives an opaque response. Instead of asking “Is this response on a list of sensitive data formats?”, ORB flips the security model to default-deny: “Can we positively prove this response is a valid resource type allowed in a no-cors context?”
ORB evaluates opaque responses through a strict three-stage pipeline:
X-Content-Type-Options: nosniff) and rigorous content sniffing.By denying unknown or ambiguous responses by default, ORB provides much stronger protection against speculative execution leaks, cross-site script inclusion (XSSI), and MIME-confusion errors.
Two production behaviors frequently surprise teams migrating endpoints under ORB:
206 Partial Content Media Ranges: For <audio> and <video> streaming, ORB validates Accept-Ranges and Content-Range metadata alongside media headers so non-media JSON or HTML responses cannot be sliced into fake byte-range media requests.X-Content-Type-Options: nosniff Interaction: When nosniff is present alongside a generic or mismatched Content-Type (such as text/plain or application/octet-stream on a script or image), ORB skips permissive fallback sniffing and immediately aborts the fetch with ERR_BLOCKED_BY_ORB.The following diagram shows how network-service defenses (CORB and ORB) filter cross-origin payloads before they cross into renderer memory, while CORS controls JavaScript API access inside the renderer:
flowchart TD
A["Web Page on Origin A"] -->|Cross-Origin Request| B["Browser Network Service"]
B -->|HTTP Response from Origin B| C{"Valid CORS Headers Allow Origin A?"}
C -->|Yes| D["Pass Response to Renderer Process"]
D --> E["CORS Check at JS API Boundary"]
E -->|fetch / XHR Read Allowed| F["Expose Body to JavaScript"]
C -->|No: Opaque no-cors Subresource| G{"Network-Layer Defense: CORB vs. ORB"}
G -->|"CORB: Confirmed HTML/XML/JSON"| H["Strip Headers & Empty Body Before Renderer"]
G -->|"ORB: Not Proven Safe Media, CSS, or JS"| I["Abort Request with Network Error Before Renderer"]
G -->|"ORB: Verified Image, Audio, Video, CSS, or JS"| J["Pass Opaque Subresource to Renderer Embed Only"]
H --> K["Untrusted Renderer Memory Stays Isolated"]
I --> K
J --> L["CORS Still Blocks Raw Byte Reads from JS"]
CORB and ORB protect pages even when servers send no opt-in isolation headers. Modern open-source browser engines—Chromium (BSD-3-Clause), Firefox / Gecko (MPL-2.0), and WebKit (LGPL-2.0+ / BSD-2-Clause)—pair ORB with explicit response headers and OS-level process boundaries:
Cross-Origin-Resource-Policy (CORP): An explicit server response header (same-origin, same-site, or cross-origin) evaluated before ORB content sniffing. Setting Cross-Origin-Resource-Policy: same-origin lets a server deterministically block cross-origin no-cors subresource embedding (<img>, <script>), even for valid image or script formats.Cross-Origin-Opener-Policy (COOP) & Cross-Origin-Embedder-Policy (COEP): Opt-in document headers (COOP: same-origin combined with COEP: require-corp or credentialless) that place a browsing context into a cross-origin isolated state (window.crossOriginIsolated === true), required to safely unlock high-resolution timers and SharedArrayBuffer.scheme + eTLD+1). Even if a subresource or navigation occurs, separate sites do not share virtual address space in the same renderer process.| Feature | CORS | CORB | ORB |
|---|---|---|---|
| Full Name | Cross-Origin Resource Sharing | Cross-Origin Read Blocking | Opaque Response Blocking |
| Primary Purpose | Opt-in protocol allowing servers to share resources across origins | Legacy defense keeping sensitive data out of renderer memory | Standardized successor to CORB blocking unsafe opaque responses |
| Who Controls It? | Server (via HTTP headers) & Browser (enforcement) | Browser automatically (no server opt-in needed) | Browser automatically (no server opt-in needed) |
| Filtering Strategy | Explicit origin & method allowlisting | Blocklist + sniffing for HTML, XML, and JSON | Default-deny unless verified as safe media, CSS, or JS |
| Action on Failure | Blocks JavaScript API from reading response | Strips headers and empties body before renderer process | Aborts with a network error before renderer process |
| Primary Threat Mitigated | Unauthorized cross-origin API reads (CSRF / data theft) | Side-channel memory reads (Spectre) via HTML/JSON/XML | Side-channel reads, XSSI, and arbitrary data leaks |
Because CORB and ORB operate transparently inside the browser, well-configured applications rarely encounter blocks. Legacy endpoints or misconfigured headers, however, can still break subresource loads. Follow these practices to avoid unexpected failures:
Content-Type headers: Label JSON as application/json and JavaScript as text/javascript. Serving scripts or structured data under generic headers like text/plain or application/octet-stream causes ORB to block subresource tags.X-Content-Type-Options: nosniff: Prevent browsers from guessing MIME types so ORB validation stays deterministic and MIME-sniffing attacks are mitigated.Access-Control-Allow-Origin explicitly for cross-origin APIs instead of relying on legacy JSONP (<script> tag) workarounds, which ORB blocks when responses are not valid JavaScript.| Mechanism | Console Error vs. Network Status | Response Body in DevTools | Typical Root Cause | Fix |
|---|---|---|---|---|
| CORS | Console CORS error; Network tab may still show HTTP 200 |
Visible in Network tab (blocked only from JS APIs) | Missing or mismatched Access-Control-Allow-Origin, missing Vary: Origin, or failed OPTIONS preflight |
Configure explicit allowlisted origins, allowed methods/headers, and Vary: Origin |
| CORB | Console warning; subresource load completes with 0 bytes |
Stripped headers and empty body before renderer | Cross-origin HTML, XML, or JSON loaded via <img> or <script> without CORS opt-in |
Consume data via fetch() with valid CORS headers instead of subresource tags |
| ORB | Network failure (net::ERR_BLOCKED_BY_ORB) |
Aborted at network layer before renderer | Generic Content-Type (text/plain / application/octet-stream), nosniff mismatch, or invalid 206 media range |
Send exact MIME types (application/json, text/javascript), valid Content-Range, or explicit CORS headers |
| CORP | Network failure (ERR_BLOCKED_BY_RESPONSE.NotSameOrigin) |
Aborted before renderer | Server set Cross-Origin-Resource-Policy: same-origin / same-site on a cross-origin embed |
Serve Cross-Origin-Resource-Policy: cross-origin (or use CORS under COEP) only for intentionally shared assets |
BSD-2-Clause) Header ConfigurationFor teams self-hosting APIs and static assets behind NGINX Open Source (BSD-2-Clause), combine allowlisted origin reflection, Vary: Origin, strict MIME enforcement, and CORP defaults:
map $http_origin $cors_origin {
default "";
"https://app.example.com" $http_origin;
}
server {
listen 443 ssl;
server_name api.example.com;
add_header X-Content-Type-Options "nosniff" always;
add_header Cross-Origin-Resource-Policy "same-site" always;
add_header Vary "Origin" always;
if ($cors_origin != "") {
add_header Access-Control-Allow-Origin $cors_origin always;
add_header Access-Control-Allow-Credentials "true" always;
}
}
Understanding browser isolation primitives also means recognizing where they stop and when a different architecture is cleaner:
curl, CLI scripts, server-to-server workers) ignore CORS and CORP headers completely—meaning CORS never replaces server-side authentication, authorization checks, or CSRF protections./api/* through a same-origin reverse proxy or Backend-for-Frontend (BFF) using pure open-source proxies (NGINX Open Source, Caddy, or Envoy) removes cross-origin OPTIONS preflight round-trip latency, simplifies cookie handling, and eliminates cross-origin credential friction entirely.Access-Control-Allow-Origin: * configurations rarely happen simply because engineers misunderstand HTTP headers. In practice, they arise from organizational and tooling friction—when frontend and backend teams work across disconnected local ports or separate staging domains without shared proxy templates. Fixing the root cause requires shipping standardized local reverse-proxy templates and CI header checks rather than treating CORS misconfigurations as isolated developer mistakes.Vary: Origin rules, ORB 206/nosniff edge cases, CORP/COOP/COEP & Site Isolation section, NGINX Open Source headers, DevTools triage matrix, and architectural trade-offs (Review Report).