GHSA-7pxr-59rr-hqj2: High severity nuget/Microsoft.OpenApi.Readers vulnerability

Published Oct 14, 2026
·
Updated

Impact

A small YAML OpenAPI document containing nested anchors and aliases can cause uncontrolled resource consumption in Microsoft.OpenApi.YamlReader and Microsoft.OpenApi.Readers. The issue affects OpenAPI document parsing through the public YAML reader APIs and can cause the parsing process to allocate excessive memory and terminate through out-of-memory conditions.

Affected versions

Microsoft.OpenApi.YamlReader

>= 2.0.0-preview.11, < 2.12.0 >= 3.0.0, < 3.10.0

Microsoft.OpenApi.Readers

< 1.6.30

Patches

For the 1.X major version, versions 1.6.30 and above are patched. For the 2.X major version, versions 2.12.0 and above are patched. For the 3.X major version, versions 3.10.0 and above are patched.

Impact

Applications, CLIs, developer tools, or services that parse untrusted YAML OpenAPI documents in-process may be terminated by a crafted YAML document containing nested anchors and aliases.

The impact is availability/process termination only. This report does not claim remote code execution, authentication bypass, credential exposure, privilege escalation, data exposure, or Microsoft hosted service impact.

Details

Microsoft.OpenApi.YamlReader and Microsoft.OpenApi.Readers parses YAML through SharpYaml. SharpYaml represents aliases as shared YamlNode instances in a directed acyclic graph, so the initial parsed YAML graph remains small. During conversion to System.Text.Json.Nodes.JsonNode, aliases must be materialized as independent nodes because JsonNode instances cannot be attached to multiple parents.

Without a bound on that conversion work, a small YAML document using nested anchors and aliases can expand exponentially during conversion. With N nested anchors each referenced k times, conversion can require k^N materialized JSON nodes, leading to excessive memory allocation and possible process termination.

This is an uncontrolled resource consumption vulnerability, also known as a "billion laughs" style denial of service.

Example payload

yaml openapi: 3.0.0 info: title: Test version: 0.0.1 paths: {} x-a: &a ["lol", "lol", "lol", "lol", "lol", "lol", "lol", "lol", "lol"] x-b: &b [a, a, a, a, a, a, a, a, a] x-c: &c [b, b, b, b, b, b, b, b, b] x-d: &d [c, c, c, c, c, c, c, c, c] x-e: &e [d, d, d, d, d, d, d, d, d] x-f: &f [e, e, e, e, e, e, e, e, e]

Remediation

Users should upgrade to Microsoft.OpenApi.YamlReader 2.12.0 or 3.10.0, or Microsoft.OpenApi.Readers 1.6.30, depending on the major version line they consume.

The patched versions bound YAML-to-JSON conversion work and fail fast instead of allowing unbounded expansion. The default limits are:

Maximum materialized node count: 5,000,000 Maximum nesting depth: 64

When the limits are exceeded, OpenApiYamlReader.Read reports an OpenApiDiagnostic error and does not return a parsed document.

The limits are exposed as process-wide static properties on YamlConverter for consumers that need to tune them for trusted workloads:

YamlConverter.MaxNodeCount YamlConverter.MaxDepth

Applications that parse OpenAPI documents from untrusted sources should avoid parsing those documents in the primary application process when possible. Running parsing in an isolated process can reduce the blast radius of parser failures.

Affected Software

3 affected componentsFixes available
nuget/Microsoft.OpenApi.Readers<1.6.30
1.6.30
nuget/Microsoft.OpenApi.YamlReader>=2.0.0-preview.11<2.12.0
2.12.0
nuget/Microsoft.OpenApi.YamlReader>=3.0.0<3.10.0
3.10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nuget/Microsoft.OpenApi.Readers to a version that resolves this vulnerability.

    Fixed in 1.6.30
  2. Upgrade

    Upgrade nuget/Microsoft.OpenApi.YamlReader to a version that resolves this vulnerability.

    Fixed in 2.12.0
  3. Upgrade

    Upgrade nuget/Microsoft.OpenApi.YamlReader to a version that resolves this vulnerability.

    Fixed in 3.10.0
  4. Upgrade

    Upgrade Microsoft.OpenApi.Readers to a version that resolves this vulnerability.

    Fixed in 1.6.30
  5. Upgrade

    Upgrade Microsoft.OpenApi.YamlReader to a version that resolves this vulnerability.

    Fixed in 2.12.0
  6. Upgrade

    Upgrade Microsoft.OpenApi.YamlReader to a version that resolves this vulnerability.

    Fixed in 3.10.0
  7. Compensating control

    Parse OpenAPI documents from untrusted sources in an isolated process rather than in the primary application process when possible, to reduce the blast radius of parser failures.

Event History

Oct 14, 2026
Advisory Published
via GitHub·08:11 PM
Data Sourced
via GitHub·08:11 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are realistically exposed?

Applications, CLIs, developer tools, and services are exposed when they parse untrusted YAML OpenAPI documents in-process using the affected Microsoft.OpenApi YAML reader functionality. The documented impact is process termination and availability loss.

2

What does an attacker need to exploit this issue?

An attacker needs a way to supply a crafted YAML OpenAPI document to an affected in-process parser. The document uses nested YAML anchors and aliases to drive excessive memory allocation and potentially trigger an out-of-memory termination.

3

What should be upgraded to remediate the issue?

Upgrade Microsoft.OpenApi.Readers to 1.6.30 or later, Microsoft.OpenApi.YamlReader 2.x to 2.12.0 or later, or Microsoft.OpenApi.YamlReader 3.x to 3.10.0 or later. Affected ranges include Microsoft.OpenApi.Readers versions below 1.6.30, YAML Reader 2.0.0-preview.11 through before 2.12.0, and YAML Reader 3.0.0 through before 3.10.0.

4

How can I determine whether an application is affected?

Check whether the application depends on either listed package in an affected version range and uses the public YAML reader APIs to parse YAML OpenAPI documents. Prioritize systems that accept those documents from untrusted sources.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203