Skip to content

SignedXml docs: warn in the verify how-to that parameterless CheckSignature is unsafe for untrusted input - #55645

Merged
gewarren merged 2 commits into
dotnet:mainfrom
krwq:checksignature-key-overload-guidance
Aug 26, 2026
Merged

gewarren merged 2 commits into
dotnet:mainfrom
krwq:checksignature-key-overload-guidance

Conversation

@krwq

@krwq krwq commented Aug 25, 2026

Copy link
Copy Markdown
Member

Copilot AI lite review requested due to automatic review settings August 25, 2026 13:43
@krwq
krwq requested review from a team and BillWagner as code owners August 25, 2026 13:43
@dotnetrepoman dotnetrepoman Bot added this to the August 2026 milestone Aug 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens the security guidance in the SignedXml verification how-to by warning that the parameterless SignedXml.CheckSignature() overload is not safe for authenticating untrusted documents because it can select attacker-controlled keys from <KeyInfo>.

Changes:

  • Adds an IMPORTANT note advising you to use SignedXml.CheckSignature overloads that take an explicit key or certificate.
  • Explains why relying on the document-provided <KeyInfo> does not establish signer trust, and points readers to the SignedXml remarks for more context.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/standard/security/how-to-verify-the-digital-signatures-of-xml-documents.md Outdated
Comment thread docs/standard/security/how-to-verify-the-digital-signatures-of-xml-documents.md Outdated
…-xml-documents.md

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@gewarren
gewarren merged commit 3693d30 into dotnet:main Aug 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants