Sep 25, 2026·7 min read·18 visits
An insecure default binding (0.0.0.0) combined with wildcard CORS headers in the @rsdoctor/rspack-plugin allowed unauthorized source code retrieval via cross-origin or local network requests.
An insecure configuration in the diagnostic HTTP server of @rsdoctor/rspack-plugin allowed unauthenticated remote attackers or malicious local websites to retrieve serialized build metadata and full source code modules.
The @rsdoctor/rspack-plugin is a diagnostic analyzer designed for the Rspack build system to help developers audit build speeds, bundle size, and compilation behavior. During the build process, the plugin automatically instantiates an embedded HTTP server to host an interactive dashboard displaying report statistics. By default, this server executes in local development environments and serves diagnostic pages locally for the developer.
Prior to version 1.5.16, the diagnostic server was configured with insecure defaults that exposed critical system information. Specifically, the server bound to all network interfaces (0.0.0.0) and served wildcard Cross-Origin Resource Sharing (CORS) headers. Additionally, it exposed several sensitive API endpoints, including the retrieval of full, uncompiled module source code maps. This architectural pattern created an immediate risk of unauthorized data exfiltration.
This vulnerability class is characterized as CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor). It represents a significant risk because build systems frequently process proprietary source files, local environment variables, and configuration paths. If exploited, an attacker can silently reconstruct the target application's codebase without authentication.
The core issue in CVE-2026-61782 stems from the combination of binding to the wild-card host address (0.0.0.0) and permissive cross-origin resource sharing headers. When an application listens on the 0.0.0.0 interface in Node.js, the operating system permits incoming network traffic on all network interfaces. This configuration exposes the diagnostic port to the local subnet, making it accessible to adjacent machines on the same physical or wireless network.
The second failure occurs in the CORS policy implementation. The server set the "Access-Control-Allow-Origin" header to "*" (wildcard) while also permitting credential transfers. This configuration disables standard browser protection mechanisms like the Same-Origin Policy (SOP). When a developer with an active diagnostic server visits a malicious website, the web browser is instructed by the malicious site to query the local server and successfully reads the response due to the wildcard CORS configuration.
The third and final component of the vulnerability is the unauthenticated POST endpoint "/api/data/key". The server mapped this route to return serialized internal build structures. A query containing the parameter "moduleCodeMap" instructed the server to return the complete mapping of module identifiers to their respective original source code. The server processed this request and replied with the full source code payload without requiring any session tokens, client authentication, or source-origin validation.
Analysis of the vulnerable implementation in packages/utils/src/build/server.ts and packages/sdk/src/sdk/server/index.ts reveals that server.listen was called with only the port argument. This triggered the default behavior in Node.js to accept connections on the unspecified IPv4 (0.0.0.0) or IPv6 (::) address. Below is a representation of the vulnerable configuration in the server initialization phase.
// Vulnerable Server Initialization
import express from 'express';
import cors from 'cors';
const app = express();
// Permissive wildcard CORS configuration allowed any origin
app.use(cors());
app.post('/api/data/key', (req, res) => {
const { key } = req.body;
// Unauthenticated access to the build-time data dictionary
const data = buildDataStore.get(key);
res.json(data);
});
// Binding without specifying the host defaults to 0.0.0.0
app.listen(port, () => {
console.log(`Diagnostic server listening on port ${port}`);
});The patches introduced in commits 602eb306a49b6d19c4c1ea9d8ee0f8caab9e208f and e9aaef21f85becfe43a46f716509f41ea5edeb40 enforced rigorous security controls. The primary modification restricted the default host to the loopback interface "127.0.0.1". Additionally, the wildcard CORS middleware was removed and replaced with a strict origin-validation mechanism. This mechanism checks that the request origin belongs to localhost or loopback IP addresses before populating the Access-Control-Allow-Origin header.
Furthermore, the WebSocket handshake protocol was hardened through a multi-step verification process. This includes verifying that the Host header points to a local address to prevent DNS rebinding attacks, and validating a cryptographically random socket token. Below is the structured representation of the remediated code paths implementing these controls.
// Patched Server Implementation (1.5.16+)
import { randomBytes } from 'crypto';
export const defaultHost = '127.0.0.1';
const LOCAL_HOSTNAMES = new Set(['localhost', '127.0.0.1', '[::1]', '::1']);
// Strict Host header validation to mitigate DNS rebinding
export function isAllowedRequestHost(host: string | undefined): boolean {
if (!host) return false;
const hostname = host.split(':')[0].toLowerCase();
return LOCAL_HOSTNAMES.has(hostname);
}
// Custom security middleware verifying cross-origin source addresses
function setCorsHeaders(req: any, res: any) {
const origin = req.headers.origin;
if (typeof origin !== 'string') return false;
try {
const url = new URL(origin);
if (LOCAL_HOSTNAMES.has(url.hostname)) {
res.setHeader('Access-Control-Allow-Origin', origin);
res.setHeader('Vary', 'Origin');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
return true;
}
} catch {
return false;
}
return false;
}Exploitation of CVE-2026-61782 does not require complex payloads or high levels of privilege. In a local area network scenario, an attacker can execute a standard TCP port scan across a subnet to discover active diagnostic ports on target developer workstations. Once an open port is identified, a single POST request containing a JSON body with the key "moduleCodeMap" returns the application source code.
In a cross-origin web attack vector, the exploit sequence occurs when a developer visits a malicious website. The website runs JavaScript code in the background that issues fetch requests to local ports on loopback (127.0.0.1) across the typical port range of the Rsdoctor server. When a request succeeds, the browser transmits the payload, receives the code map, and sends it to an attacker-controlled listener.
The attack flow can be modeled using the following architecture diagram, illustrating the interaction between the developer workstation, the malicious site, and the vulnerable server.
The impact of this vulnerability is categorized as high because it allows complete exposure of the application source code being analyzed. Under development conditions, the compiled assets contain not only public frontend scripts but also proprietary intellectual property, draft algorithms, internal system logic, and test files. This direct exfiltration of source code severely compromises intellectual property protection.
Moreover, configuration metadata is also exposed via the "/api/data/key" endpoint when querying other keys like "configs". These configurations often store absolute file system paths, local user directories, environment variables, or hardcoded API keys. Access to these parameters provides an attacker with actionable intelligence about the developer's workstation environment, facilitating further privilege escalation or targeted attacks.
This vulnerability is assigned a CVSS 3.1 base score of 7.5 (High). It has an attack vector of Network and requires no user privileges or operational complexity. It represents a significant threat to development workstations in both corporate offices and public network environments.
The primary remediation strategy is to upgrade @rsdoctor/rspack-plugin to version 1.5.16 or higher. The package manager will resolve the underlying @rsdoctor/sdk and @rsdoctor/utils dependencies to their patched states. This restricts the diagnostic HTTP server to listen exclusively on the local loopback interface (127.0.0.1), preventing external nodes on the network from initiating connections.
If an immediate upgrade is not feasible, developers should configure their build tasks to run with the "CI" environment variable set to "true". The Rsdoctor plugin automatically disables the diagnostic client server when a CI environment is detected. This effectively mitigates the vulnerability by preventing the server from launching entirely.
As a defense-in-depth measure, development organizations should enforce strict firewall policies on workstation endpoints. Restricting incoming connections to development machines prevents unauthorized network-adjacent discovery of diagnostic servers. Developers should also avoid visiting untrusted websites while local developer servers are running in the background.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@rsdoctor/rspack-plugin web-infra-dev | < 1.5.16 | 1.5.16 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-200 |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 Score | 7.5 (High) |
| Exploit Status | Proof of Concept |
| Impact | Confidentiality: High |
| CISA KEV Status | Not Listed |
The product exposes sensitive information to an actor who is not explicitly authorized to have access to that information.
CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.
CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.
CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).
CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.
Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.
CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.