CVE-2026-134818 in oasdiff
Summary
by MITRE • 11/23/2026
oasdiff 1.24.0 before 1.34.1 fails to enforce --allow-external-refs=false when --open is used, because the recordingReader() capture reader in load/capture.go never applies the external-reference policy. Attackers supplying an untrusted OpenAPI spec can use external $ref values to read local files or trigger HTTP requests, with contents uploaded in the review bundle.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/23/2026
The vulnerability identified in oasdiff versions prior to 1.34.1 represents a critical failure in input validation and access control mechanisms within an OpenAPI specification comparison tool. The core issue stems from a logic error in the load/capture.go module, specifically within the recordingReader function which is responsible for capturing reader instances during the processing of OpenAPI documents. When users invoke the tool with the --open flag to process remote or local specifications, and explicitly set the --allow-external-refs=false parameter to restrict external references, the software fails to enforce this security policy. The root cause lies in the fact that the recordingReader captures a reader instance before the external-reference validation logic is applied, effectively bypassing the restriction designed to prevent access to resources outside the specified scope.
This architectural flaw allows attackers who supply untrusted OpenAPI specification files to exploit the misconfiguration by embedding malicious $ref values within the document structure. In standard OpenAPI specifications, the $ref keyword is used to reference external schemas or definitions. However, in this vulnerable implementation, these references are resolved without checking against the allow-external-refs policy. Consequently, an attacker can craft a specification that includes absolute file paths pointing to sensitive local files on the host system where oasdiff is executed. When the tool processes such a maliciously crafted spec, it reads and potentially exposes the contents of these restricted local files, leading to a severe information disclosure vulnerability.
Beyond local file access, the flaw also enables server-side request forgery scenarios. By specifying external HTTP URLs within the $ref fields, an attacker can force the oasdiff application to initiate outbound network requests to arbitrary destinations controlled by the adversary. This capability transforms the tool from a passive analysis utility into an active vector for attacking internal infrastructure or exfiltrating data via DNS tunneling or other covert channels embedded in the response handling of these external references. The contents retrieved from these unauthorized reads are then uploaded as part of the review bundle generated by the tool, further facilitating the leakage of sensitive information to unintended recipients or storage locations associated with the CI/CD pipeline or development environment where oasdiff is typically deployed.
From a classification perspective, this vulnerability aligns closely with CWE-20 Improper Input Validation and CWE-918 Server-Side Request Forgery (SSRF). The failure to validate that external references comply with security policies constitutes an improper input validation error, as the application accepts data structures containing maliciously constructed reference paths without adequate sanitization or policy enforcement. Furthermore, the ability to trigger HTTP requests to arbitrary hosts maps directly to ATT&CK technique T1572 Protocol Tunneling and potentially T1046 Network Service Discovery if used for reconnaissance within an internal network. The lack of strict adherence to configured security flags indicates a deeper issue in how command-line arguments are propagated through the application's execution context, particularly when interacting with external resource loaders.
The operational impact of this vulnerability is significant, particularly in environments where oasdiff is integrated into automated CI/CD pipelines or used by developers reviewing third-party API specifications. If an attacker can inject a malicious OpenAPI spec into such a pipeline, they may achieve remote code execution implications indirectly through data exfiltration or disrupt the integrity of security reviews by hiding vulnerabilities behind legitimate-looking specification structures. The exposure of local file contents could reveal secrets, configuration files, source code, or other sensitive artifacts stored on the build server or developer workstation. This undermines the trust in automated API governance tools and poses a risk to organizations relying on these utilities for compliance and security auditing.
To mitigate this vulnerability, users must upgrade oasdiff to version 1.34.1 or later, where the recordingReader logic has been corrected to properly apply external-reference policies regardless of whether the --open flag is used. In addition to upgrading, it is advisable to implement strict allow-listing for any external references if such functionality remains necessary in specific use cases. Organizations should also audit their CI/CD pipelines to ensure that oasdiff inputs are sourced from trusted repositories and not subject to injection by untrusted parties. Monitoring network egress traffic from build servers can help detect potential SSRF attempts, while restricting file system permissions for the user account running oasdiff can limit the scope of data accessible via local path traversal attacks. Regular security reviews of tool configurations and dependency updates are essential to maintain a robust defense posture against such input validation failures.