Impact
Parsing a YAML OpenAPI document that contains nested anchors and aliases can trigger uncontrollable memory usage in Microsoft.OpenApi.YamlReader. The affected library loads the YAML into a directed acyclic graph via SharpYaml, then converts it to System.Text.Json.Nodes.JsonNode, duplicating each alias as an independent node. Because no bounding on node count or nesting depth is enforced, a maliciously crafted document with multiple nested anchors each referenced many times can create exponential numbers of materialized nodes, exhausting the process's memory and causing an out‑of‑memory crash—a denial‑of‑service condition. The vulnerability has been corrected by imposing a default limit of 5 000 000 nodes and a nesting depth of 64, with an OpenApiDiagnostic error raised when thresholds are exceeded.
Affected Systems
The vulnerability affects Microsoft.OpenApi.YamlReader versions from 2.0.0‑preview.11 up through 2.11.x and from 3.0.0 through 3.9.x, as well as Microsoft.OpenApi.Readers versions prior to 1.6.30. The issue is resolved in Microsoft.OpenApi.YamlReader 2.12.0 and 3.10.0, and Microsoft.OpenApi.Readers 1.6.30 and later.
Risk and Exploitability
The CVSS score of 7.5 indicates a high‑impact denial of service, while the EPSS score of 1% suggests a modest likelihood of exploitation and the vulnerability is not present in the CISA KEV catalog. Based on the description, it is inferred that no authentication is required; any component that accepts user‑supplied OpenAPI definitions is at risk. The likely attack vector involves an attacker providing a malicious OpenAPI document via file upload, API consumption, or other means of influencing the parser, which can be executed remotely as long as the application processes user input.
OpenCVE Enrichment
Github GHSA