Skip to content

Fix GHSA-rvv3-g6hj-g44x: default MaxDepth of 64 for self-referential types (15.x backport)#4619

Merged
jbogard merged 2 commits intorelease/15.xfrom
security/ghsa-rvv3-g6hj-g44x-15.x
Mar 15, 2026
Merged

Fix GHSA-rvv3-g6hj-g44x: default MaxDepth of 64 for self-referential types (15.x backport)#4619
jbogard merged 2 commits intorelease/15.xfrom
security/ghsa-rvv3-g6hj-g44x-15.x

Conversation

@jbogard
Copy link
Contributor

@jbogard jbogard commented Mar 15, 2026

Summary

  • Backport of the GHSA-rvv3-g6hj-g44x security fix to the release/15.x line
  • When CheckForCycles auto-enables PreserveReferences for a self-referential reference type, also sets MaxDepth=64 if no explicit limit is configured — matching the default in System.Text.Json and Newtonsoft.Json
  • Prevents a StackOverflowException DoS from deeply nested distinct object graphs (25,000+ levels)
  • Also fixes pre-existing .NET 9 build error in MultiThreadingIssues.cs (Array.Reverse() instance method added in .NET 9 shadowed the LINQ extension)

Test plan

  • DeepNestingStackOverflow — maps a 30,000-deep chain without crashing; result truncated at ≤ 64 levels
  • AssertConfigurationIsValid test passes (config validation is unaffected)
  • Full unit test suite: 1,189 passed

Closes GHSA-rvv3-g6hj-g44x

🤖 Generated with Claude Code

jbogard and others added 2 commits March 15, 2026 10:51
…ntial types

When CheckForCycles auto-enables PreserveReferences for a self-referential
reference type, also set MaxDepth=64 (matching System.Text.Json/Newtonsoft.Json
defaults) if no explicit limit is configured. This prevents a StackOverflowException
DoS when mapping deeply nested distinct object graphs.

Also fixes pre-existing .NET 9 build error in MultiThreadingIssues.cs where
Array.Reverse() instance method (added in .NET 9, returns void) shadowed the
LINQ Reverse() extension method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Port Azure Key Vault signing, SBOM generation, and OIDC authentication
from the main branch release pipeline to the release/15.x branch.
Signing and publishing now happen in the Windows job alongside build/test.
Linux job retained for cross-platform build verification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jbogard jbogard merged commit 8a441c6 into release/15.x Mar 15, 2026
3 checks passed
@jbogard jbogard deleted the security/ghsa-rvv3-g6hj-g44x-15.x branch March 15, 2026 16:11
@ibakirov
Copy link

@jbogard Could you please backport of GHSA-rvv3-g6hj-g44x security fix to the release/14.x version?

@jbogard
Copy link
Contributor Author

jbogard commented Mar 18, 2026

@ibakirov We only support the last 2 major versions, all versions prior to 15.x are not supported.

The prior versions also don't include code signing certificates, which NuGet would reject now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants