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·4 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

•about 1 hour ago•CVE-2026-57231
7.5

CVE-2026-57231: Podman Malformed Image Host Environment Variable Leak

CVE-2026-57231 is a high-severity vulnerability in the Podman container engine. When executing a container from a crafted OCI or Docker image, malformed environment variable entries lacking an equals separator can trigger an unexpected behavior in the spec generation parser. This vulnerability enables a container image to silently exfiltrate host environment variables into the running container workspace, exposing high-privilege credentials and sensitive runtime secrets.

Amit Schendel
Amit Schendel
4 views•8 min read
•about 1 hour ago•CVE-2026-74480
9.8

CVE-2026-74480: Use-After-Free in Linux Kernel Network Bridge Multicast Routing

CVE-2026-74480 is a critical memory safety vulnerability in the Linux kernel's network bridge multicast routing subsystem (net: bridge) resulting from a Use-After-Free (UAF) condition during fast-leave processing of IGMP/MLD multicast groups.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 2 hours ago•CVE-2026-21992
9.8

Oracle Fusion Middleware Security Alert Advisory - CVE-2026-21992

CVE-2026-21992 is a critical, unauthenticated remote code execution (RCE) vulnerability affecting the REST WebServices component of Oracle Identity Manager (OIM) and the Web Services Security component of Oracle Web Services Manager (OWSM). Exploitation occurs over standard network protocols without user interaction, enabling a complete compromise of target system infrastructure.

Alon Barad
Alon Barad
2 views•6 min read
•about 3 hours ago•CVE-2026-59980
6.3

CVE-2026-59980: Uncontrolled Resource Consumption in python-hyper/hpack

CVE-2026-59980 is a CPU exhaustion vulnerability in python-hyper/hpack, where an unauthenticated remote attacker can trigger an infinite loop or high computational complexity overhead by sending a crafted HTTP/2 stream containing excessive variable-length integer continuation octets.

Amit Schendel
Amit Schendel
6 views•8 min read
•about 4 hours ago•CVE-2026-61816
7.5

CVE-2026-61816: Uncontrolled Resource Consumption and Algorithmic Complexity in zbateson/mail-mime-parser

The PHP email processing library zbateson/mail-mime-parser is vulnerable to multiple algorithmic complexity exploits. By submitting small, highly structured email payloads, remote, unauthenticated attackers can trigger high CPU utilization or out-of-memory states, causing an application-wide denial of service.

Alon Barad
Alon Barad
6 views•6 min read
•about 5 hours ago•CVE-2026-61815
7.2

CVE-2026-61815: Remote SMTP Header Injection via Unsanitized MIME Decoded Filenames in zbateson/mail-mime-parser

CVE-2026-61815 is a high-severity Carriage Return / Line Feed (CRLF) header injection vulnerability in the zbateson/mail-mime-parser library. Due to incomplete sanitization logic, encoded newline sequences within filenames and headers survive parsing and translate into literal CRLF control bytes. When applications process or forward these payloads, the library writes the unescaped control bytes directly into outbound SMTP metadata, allowing remote attackers to inject rogue headers or compromise message integrity.

Alon Barad
Alon Barad
5 views•6 min read