CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-61782

CVE-2026-61782: Sensitive Information Disclosure and Source Code Exfiltration via Insecure HTTP Server Defaults in @rsdoctor/rspack-plugin

Alon Barad
Alon Barad
Software Engineer

Sep 25, 2026·7 min read·18 visits

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code Analysis

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 Methodology

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.

Impact Assessment

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.

Remediation & Defense-in-Depth

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.

Fix Analysis (2)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected Systems

@rsdoctor/rspack-plugin prior to 1.5.16

Affected Versions Detail

Product
Affected Versions
Fixed Version
@rsdoctor/rspack-plugin
web-infra-dev
< 1.5.161.5.16
AttributeDetail
CWE IDCWE-200
Attack VectorNetwork (AV:N)
CVSS v3.1 Score7.5 (High)
Exploit StatusProof of Concept
ImpactConfidentiality: High
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
T1552Unsecured Credentials
Credential Access
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor who is not explicitly authorized to have access to that information.

References & Sources

  • [1]GitHub Security Advisory GHSA-jmg2-rcxh-w8q3
  • [2]CVE-2026-61782 CVE Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•14 minutes ago•GHSA-QX75-2P3R-PWM5
7.7

CVE-2026-55622: Cross-Project Instance Copy Authorization Bypass in Canonical LXD and LXC Incus

CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 1 hour ago•GHSA-7MR3-28H5-M5VX
7.7

GHSA-7mr3-28h5-m5vx: Authorization Bypass and Cross-Project Volume Copy in Canonical LXD

An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.

Alon Barad
Alon Barad
2 views•10 min read
•about 2 hours ago•GHSA-47W9-6R3F-938G
9.9

GHSA-47w9-6r3f-938g: Authorization Bypass and Host Root Command Execution in Canonical LXD and Incus

A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.

Alon Barad
Alon Barad
4 views•11 min read
•about 3 hours ago•GHSA-JPF8-86F3-WP38
9.9

CVE-2026-48752: Arbitrary Host File Read and Write via Templates Symlink in Canonical LXD and Incus

A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.

Amit Schendel
Amit Schendel
4 views•10 min read
•1 day ago•CVE-2026-12411
8.4

CVE-2026-12411: Cross-Guest Volume Hijack via DevLXD Device PATCH in Canonical LXD

CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-105769
9.3

CVE-2026-105769: Azure Entra ID Token Exfiltration in Kaniko via Unanchored ACR Hostname Regex

CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.

Amit Schendel
Amit Schendel
11 views•11 min read