Kuboid
Open Luck·Kuboid.in
Security BSides2025
Open in YouTube ↗

0.0.0.0 Day: Exploiting Private Networks Through The Browser

Security BSides San Francisco127 views39:4210 months ago

This talk demonstrates how the 0.0.0.0 IP address can be used to bypass browser-based security controls, such as Private Network Access (PNA) and CORS, to interact with local services. The speaker shows how this technique allows an attacker to perform unauthorized actions on internal applications, including those running on localhost. The presentation highlights the risks of relying on network-level security for local services and provides a proof-of-concept for remote code execution on Ray clusters. The talk concludes with a call to action for developers to implement robust authentication and authorization for local services.

0.0.0.0 Day: How Browsers Became the Ultimate Proxy for Internal Network Attacks

TLDR: Researchers have discovered that the 0.0.0.0 IP address can be used to bypass browser-level security controls like Private Network Access (PNA) and CORS, allowing attackers to interact with local services. This technique effectively turns a victim's browser into a proxy for scanning and exploiting internal applications, including those running on localhost. Security teams must stop relying on network-level isolation and implement robust authentication and authorization for all local services.

Security researchers have long warned that localhost is not a security boundary, but the industry continues to treat it as one. The recent disclosure of the 0.0.0.0 day vulnerability proves that even modern browser protections, which are designed to prevent cross-site request forgery (CSRF) against private networks, can be trivialized by a simple IP address manipulation. This is not a theoretical bug; it is a fundamental flaw in how browsers handle network requests that allows an attacker to reach services that were never intended to be exposed to the public internet.

The Mechanics of the Bypass

At the heart of this issue is the way browsers handle the 0.0.0.0 address. While most developers associate 127.0.0.1 with the loopback interface, 0.0.0.0 is a non-routable meta-address that, when used as a destination in a browser request, is often interpreted by the underlying operating system as a request to the local machine.

Because many browsers have implemented Private Network Access protections to block public websites from making requests to private IP ranges, they rely on a blocklist of known private addresses. The 0.0.0.0 address often slips through these filters because it is not explicitly categorized as a private network range in the same way as 192.168.x.x or 10.x.x.x. By targeting 0.0.0.0, an attacker can bypass these PNA checks entirely.

When a victim visits a malicious website, the site can execute JavaScript to send an HTTP request to http://0.0.0.0:[port]. If a service is listening on that port, the browser will attempt to connect. Even if the browser triggers a CORS error, the request has already reached the target service. For many applications, the mere act of receiving the request is enough to trigger a state change or perform an unauthorized action.

Exploiting Ray Clusters

The most dangerous application of this technique involves Ray, a framework used extensively for scaling AI and machine learning workloads. Ray clusters often expose a dashboard on port 8265 that lacks default authentication. An attacker can use the 0.0.0.0 technique to send a POST request to the Ray API, effectively achieving Remote Code Execution (RCE) on the cluster.

The attack flow is straightforward:

  1. The attacker hosts a malicious page that sends a crafted POST request to the Ray dashboard API.
  2. The victim's browser, acting as a proxy, sends the request to http://0.0.0.0:8265/api/jobs/.
  3. The Ray cluster executes the job, which can be used to spawn a reverse shell or exfiltrate sensitive data like AWS credentials or API keys.

This vulnerability was central to a series of issues, including CVE-2023-48022, CVE-2023-6019, CVE-2023-6020, CVE-2023-6021, and CVE-2023-48023. While the maintainers initially disputed the findings as "intended behavior," the reality is that exposing such powerful APIs without authentication is a critical Security Misconfiguration that attackers are actively exploiting.

Why This Matters for Pentesters

During a penetration test, you should no longer assume that internal services are safe just because they are not reachable from the external network. If you can get a user to click a link or visit a page, you can potentially pivot into their internal network.

When testing, look for services running on common ports like 8000, 8080, or 8265 that are bound to 0.0.0.0 or 127.0.0.1. Use a tool like nmap to identify these services, then attempt to interact with them via a browser-based payload. If the service accepts requests without a valid Origin header or authentication token, you have a clear path to exploitation.

Defensive Measures

The fix is not to wait for browser vendors to patch every edge case. The responsibility lies with the developers of these local services. Every service that accepts network connections, even on localhost, must implement:

  • Authentication: Require a valid token or session for every request.
  • Authorization: Ensure the user has the necessary permissions to perform the requested action.
  • CORS Policies: Explicitly define allowed origins and reject requests from unknown or public domains.

Do not rely on the assumption that your service is "hidden" behind a firewall or NAT. As this research demonstrates, the browser is a powerful, often overlooked, tool for lateral movement. If you are building tools that run locally, treat them with the same security rigor as a public-facing web application. The era of "it's just on my machine" is over.

Talk Type
research presentation
Difficulty
advanced
Category
web security
Has Demo Has Code Tool Released


BSidesSF 2025

94 talks · 2025
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in