ZeroHour

CVE-2026-72923

large

Billion-laughs DoS in Microsoft.OpenApi.YamlReader and Microsoft.OpenApi.Readers

CVSS 3.1
7.5 high
EPSS
1%p66
Published
()
Modified
AI analysis

CVE-2026-72923 is a denial-of-service flaw (CWE-400, uncontrolled resource consumption) in the Microsoft.OpenApi.YamlReader package (versions 2.0.0-preview.11 until 2.12.0, and 3.0.0 until 3.10.0) and the Microsoft.OpenApi.Readers package (prior to 1.6.30), which .NET applications use to parse YAML OpenAPI documents. A small attacker-supplied YAML document using nested anchors and aliases is enough: SharpYaml stores aliases as shared nodes in a compact directed-acyclic graph, but converting that graph to System.Text.Json.Nodes.JsonNode forces every alias to be materialized as an independent node because a JsonNode cannot be attached to multiple parents, so N nested anchors each referenced k times can balloon into k^N JSON nodes. Because the YAML-to-JSON conversion had no bound, an attacker who can make an application parse a crafted document gains remote denial of service: memory allocation grows without limit until the process terminates on an out-of-memory condition, with no confidentiality or integrity impact (CVSS 3.1 7.5, availability only). Any .NET service or tooling that parses untrusted or attacker-influenced OpenAPI YAML with these libraries is affected; the patched releases bound the conversion by node count and nesting depth and report an OpenApiDiagnostic error instead of expanding without limit. No public proof-of-concept is known, the flaw is not in CISA's KEV catalog, and EPSS currently assigns about a 1.2% probability of exploitation within 30 days, so no exploitation is known to date.

What to do: Upgrade Microsoft.OpenApi.YamlReader to 2.12.0 (2.x line) or 3.10.0 (3.x line), and Microsoft.OpenApi.Readers to 1.6.30, checking NuGet dependency trees for transitive Microsoft.OpenApi.* references. Until patched, avoid parsing untrusted or user-supplied YAML OpenAPI documents with these libraries or restrict such documents to trusted sources and bounded sizes. After upgrading, over-nested or over-aliased documents will be rejected with an OpenApiDiagnostic error rather than expanded without limit.

Affected
Microsoft.OpenApi.YamlReader (NuGet)2.0.0-preview.11 until 2.12.0, and 3.0.0 until 3.10.0 (fixed in 2.12.0 and 3.10.0)
Microsoft.OpenApi.Readers (NuGet)prior to 1.6.30 (fixed in 1.6.30)
Estimated exposure
large≈100,000+ .NET deployments plausibly depend on the affected packages (tens of millions of cumulative NuGet downloads), though only those parsing untrusted YAML… — Estimate based on deployment patterns of the foundational Microsoft.OpenApi NuGet packages, which have download counts in the tens of millions and are pulled in transitively by common .NET OpenAPI tooling; the directly exposed subset…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In Microsoft.OpenApi.YamlReader from 2.0.0-preview.11 until 2.12.0 and from 3.0.0 until 3.10.0, and in Microsoft.OpenApi.Readers prior to 1.6.30, a small YAML OpenAPI document containing nested anchors and aliases can cause uncontrolled resource consumption when parsed through the public YAML reader APIs. YAML is parsed through SharpYaml, which represents aliases as shared nodes in a directed acyclic graph, so the parsed YAML graph stays small, but converting that graph to System.Text.Json.Nodes.JsonNode requires every alias to be materialized as an independent node because a JsonNode cannot be attached to multiple parents. Without a bound on that conversion work, a document with N nested anchors each referenced k times can require k^N materialized JSON nodes, leading to excessive memory allocation and process termination through out-of-memory conditions, a billion laughs style denial of service. The patched versions bound the YAML-to-JSON conversion by node count and nesting depth and report an OpenApiDiagnostic error instead of expanding without limit. This vulnerability is fixed in Microsoft.OpenApi.YamlReader 2.12.0 and 3.10.0, and Microsoft.OpenApi.Readers 1.6.30.

Weakness
CWE-400
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

In the news

No ingested article mentions this CVE yet.