CORS on Internal and Local Services

Unauthenticated intranet apps, localhost agents and LAN devices that send Access-Control-Allow-Origin: * (or never needed CORS at all) let any web page the victim visits use the victim’s network position as the credential: it can read data, and through simple requests it can act.

How it works

* cannot carry cookies, but on these targets nothing needs to be carried. The “auth” is that the browser sits on the VPN, LAN or loopback. Attacker JS in the victim’s browser reaches the internal host, and * lets it read the response (Outpost24). HackTricks puts it the same way: an unauthenticated loopback or internal API is still CSRF-able because “the victim browser contributes its network position instead of a cookie” (HackTricks CSRF).

Even without *, simple requests (form-encoded, multipart or text/plain POSTs) reach the service. CORS only hides the response (Eight Doors, Tib3rius).

Browser network-access controls and their gaps

  • Private Network Access: a request from a more public to a more private address space sends a preflight with Access-Control-Request-Private-Network: true and needs Access-Control-Allow-Private-Network: true back. WebSockets skip it, so CSWSH against private IPs still works (Include Security).
  • Local Network Access (Chrome 142, Firefox 151, Edge 143) prompts before cross-origin requests to localhost. Neither CORS nor LNA blocks top-level navigations, so a form POST still lands (Datadog OpenCode).
  • Older history: Zoom’s localhost server returned data encoded in image dimensions to work around CORS, and browser vendors pointed to the CORS-RFC1918 proposal as the eventual fix (CVE-2019-13449/13450) (Zoom zero-day).

Techniques / payloads

  • Read an unauthenticated API (Astra):
    fetch('http://<victim-ip>:61208/api/4/all').then(r => r.json()).then(exfil)
  • Steal secrets embedded in internal SPAs: internal apps with permissive CORS expose API keys hardcoded in their client-side JS to any internet origin. AWS and other SaaS APIs send ACAO: *, which encourages putting credentials in browser code in the first place (TruffleHog).
  • Drive a local daemon to RCE: *-CORS plus no auth let a page POST to /api/apps/install-private-space, read the job_id, and poll /api/apps/job-status/<uuid> (JFrog).
  • CORS-blocked JSON, so switch to a form: when the preflight fails, resend as application/x-www-form-urlencoded or as text/plain with a JSON-looking body via a top-level form submit (Datadog OpenCode).

Notable cases

  • Glances CVE-2026-34839: glances -w -B 0.0.0.0 exposes /api/4/all (processes, network interfaces, host fingerprint) to any origin with no auth. Fixed after 4.5.2 (Astra).
  • Reachy Mini robot: FastAPI on 0.0.0.0:8000, allow_origins/methods/headers=["*"], no auth, mDNS-advertised. A page triggers a pip install of an attacker HF Space using the operator’s HF token (CVE-2026-96455), giving a reverse shell (JFrog).
  • OpenCode GHSA-632h-h47v-g4x4: the local API on 127.0.0.1:4096 refused the CORS preflight, but a form POST to /global/upgrade installed an attacker tarball (Datadog OpenCode).
  • Apache Zeppelin CVE-2026-44613: default allowed origins * plus text/plain bodies allowed forged credentialed REST and WebSocket actions. The default is now an empty allowlist (OX).
  • Internal Bitbucket (Outpost24 case 7): no auth plus *, so a VPN user’s browser leaked private repositories (Outpost24).
  • Langflow: on-prem, non-public instances were also exploitable because the request originates from the victim’s browser (Obsidian).

Defenses

  • Bind to 127.0.0.1, require authentication even on “trusted” networks, and restrict CORS to the dashboard’s real origin. Don’t use * (Astra, JFrog).
  • Reject CORS-safelisted content types on JSON endpoints, and validate Origin server-side on state-changing calls (OX, Eight Doors).
  • Treat * on internal apps as a real finding during VPN-side testing (Outpost24).

Sources