GHSA-7pxr-59rr-hqj2

Suggest an improvement
Source
https://github.com/advisories/GHSA-7pxr-59rr-hqj2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-7pxr-59rr-hqj2/GHSA-7pxr-59rr-hqj2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7pxr-59rr-hqj2
Aliases
Published
2026-10-14T20:11:29Z
Modified
2026-10-14T20:15:04Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Microsoft.OpenApi.YamlReader vulnerable to denial of service via YAML alias expansion
Details

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

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.

Database specific
{
    "cwe_ids":  [
        "CWE-400",
        "CWE-770"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-14T20:11:29Z",
    "nvd_published_at":  "2026-09-08T18:20:16Z",
    "severity":  "HIGH"
}
References

Affected packages

NuGet / Microsoft.OpenApi.YamlReader

Package

Name
Microsoft.OpenApi.YamlReader
View open source insights on deps.dev
Purl
pkg:nuget/Microsoft.OpenApi.YamlReader

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
3.10.0

Affected versions

3.*
3.0.0
3.0.1
3.0.2
3.0.3
3.1.1
3.1.2
3.1.3
3.2.0
3.3.0
3.3.1
3.4.0
3.5.0
3.5.1
3.5.2
3.5.3
3.5.4
3.5.5
3.6.0
3.7.0
3.8.0
3.9.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-7pxr-59rr-hqj2/GHSA-7pxr-59rr-hqj2.json"

NuGet / Microsoft.OpenApi.YamlReader

Package

Name
Microsoft.OpenApi.YamlReader
View open source insights on deps.dev
Purl
pkg:nuget/Microsoft.OpenApi.YamlReader

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.0.0-preview.11
Fixed
2.12.0

Affected versions

2.*
2.0.0
2.0.1
2.1.0
2.2.0
2.3.0
2.3.1
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
2.3.7
2.3.8
2.3.9
2.3.10
2.3.11
2.3.12
2.4.0
2.4.1
2.4.2
2.4.3
2.5.0
2.6.0
2.6.1
2.7.0
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.8.0
2.9.0
2.10.0
2.11.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-7pxr-59rr-hqj2/GHSA-7pxr-59rr-hqj2.json"

NuGet / Microsoft.OpenApi.Readers

Package

Name
Microsoft.OpenApi.Readers
View open source insights on deps.dev
Purl
pkg:nuget/Microsoft.OpenApi.Readers

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.6.30

Affected versions

1.*
1.0.0-beta008
1.0.0-beta009
1.0.0-beta010
1.0.0-beta011
1.0.0-beta012
1.0.0-beta013
1.0.0-beta014
1.0.0-beta015
1.0.0-beta016
1.0.0-beta017
1.0.0
1.0.1
1.1.0
1.1.1
1.1.2
1.1.3
1.1.4
1.2.0-preview
1.2.0
1.2.1
1.2.2
1.2.3
1.3.0-preview
1.3.1-preview4
1.3.1-preview5
1.3.1-preview6
1.3.1
1.3.2
1.4.0-preview1
1.4.0-preview2
1.4.0-preview3
1.4.0
1.4.1
1.4.4-preview1
1.4.4
1.4.5
1.5.0
1.6.0
1.6.1
1.6.2
1.6.3
1.6.4-preview1
1.6.4-preview2
1.6.4-preview3
1.6.4-preview4
1.6.4
1.6.5
1.6.6
1.6.7
1.6.8
1.6.9
1.6.10
1.6.11
1.6.12
1.6.13
1.6.14
1.6.15
1.6.16
1.6.17
1.6.18
1.6.19
1.6.20
1.6.21
1.6.22
1.6.23
1.6.24
1.6.25
1.6.26
1.6.27
1.6.28
1.6.29

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-7pxr-59rr-hqj2/GHSA-7pxr-59rr-hqj2.json"