CVE-2026-136181 in cnpmcore
Summary
by MITRE • 11/24/2026
cnpmcore 3.46.0 before 3.84.3 and 4.0.0 before 4.37.3 contains an information disclosure vulnerability that allows unauthenticated attackers to obtain upstream registry authTokens via the GET /-/registry endpoints lacking AdminAccess middleware. Attackers can request /-/registry or /-/registry/:id and replay the leaked authToken as a Bearer credential to enumerate, download, or publish packages upstream.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/29/2026
The vulnerability identified in cnpmcore versions 3.46.0 through 3.84.3 and version 4.0.0 prior to 4.37.3 represents a critical information disclosure flaw rooted in improper access control mechanisms within the application's API layer. Specifically, the GET endpoints for /-/registry and /-/registry/:id are designed to facilitate interactions with upstream npm registries but fail to enforce necessary authentication checks via AdminAccess middleware. This architectural oversight allows unauthenticated actors to interact directly with these internal proxy functions without providing valid administrative credentials or session tokens. The core technical flaw lies in the misconfiguration of route handlers where sensitive operational data is exposed through public-facing interfaces that should be restricted to authorized administrators only. By bypassing the intended authentication gate, attackers can retrieve configuration details and, more critically, active upstream registry authTokens embedded within the response payloads.
The exploitation of this vulnerability enables a range of malicious activities against both the cnpmcore instance operator and their associated upstream npm registries. Once an attacker obtains these leaked authToken credentials, they possess valid Bearer tokens that authenticate them as legitimate users or administrators on the upstream registry. This allows for the enumeration of private packages that would otherwise be hidden from public view, effectively bypassing privacy controls implemented by package maintainers. Furthermore, attackers can download sensitive source code and binary artifacts intended only for authorized consumers, leading to intellectual property theft. In more severe scenarios, the possession of these tokens permits the publication of malicious packages under trusted identities or namespaces, potentially poisoning downstream dependencies for organizations relying on this cnpmcore instance as a private registry mirror.
From an industry standard perspective, this vulnerability aligns with CWE-200: Information Exposure and CWE-862: Missing Authorization, reflecting both the leakage of sensitive data and the failure to enforce access controls. In terms of attack vectors, it corresponds to MITRE ATT&CK techniques such as T1530: Data from Cloud Storage Object Discovery for enumeration and T1499: Endpoint Denial of Service if malicious packages are published to disrupt service integrity. The impact extends beyond simple data leakage into potential supply chain compromise, where trusted artifacts are replaced with malware or backdoors before distribution to end users.
Mitigation strategies must prioritize immediate patching to the latest stable versions of cnpmcore that include fixes for this access control issue. Administrators should verify that all registry proxy endpoints are strictly protected by robust authentication middleware and that no internal APIs are exposed without proper validation layers. Additionally, it is imperative to rotate any upstream registry tokens that may have been compromised during the window of vulnerability exposure. Security monitoring should be enhanced to detect unusual patterns in API requests, particularly those targeting registry endpoints from unauthenticated sources or exhibiting high-frequency enumeration behavior. Regular audits of middleware configurations and route definitions will help prevent similar misconfigurations in future deployments.