Skip to content

Update MailKit to 4.18.2 and keep e-mails out of OIDC sync logs - #985

Merged
KrzysztofPajak merged 2 commits into
developfrom
fix/vulnerable-pkcs-and-oidc-email-logs
Oct 24, 2026
Merged

KrzysztofPajak merged 2 commits into
developfrom
fix/vulnerable-pkcs-and-oidc-email-logs

Conversation

@KrzysztofPajak

@KrzysztofPajak KrzysztofPajak commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Type: bugfix

Issue

  1. MailKit 4.18.1 pulls System.Security.Cryptography.Pkcs 10.0.0 transitively (through MimeKit 4.18.1) into Grand.Business.Messages and everything above it. dotnet list package --vulnerable --include-transitive reports it against GHSA-846f-f764-76mx (high) and GHSA-2fmv-rv2c-59x7 (moderate); both are fixed in 10.0.13.
  2. When the OpenID Connect profile synchronizer refuses to change a customer's e-mail (break-glass account, break-glass address, address owned by another customer), it wrote both the current and the identity provider's e-mail address to the log. CodeQL reports this as cs/exposure-of-sensitive-information in OidcProfileSynchronizer.cs.

Solution

  1. Update MailKit to 4.18.2. It depends on MimeKit 4.18.2, which requires System.Security.Cryptography.Pkcs 10.0.13, so no explicit pin is needed.
  2. The three warnings now carry only the customer ids ({CustomerId}, {OtherId}). The test for the "taken by another customer" case now asserts that no e-mail reaches the log.

Breaking changes

None. The log message templates changed; nothing parses them.

Testing

  1. dotnet list GrandNode.slnx package --vulnerable --include-transitive: all projects report no vulnerable packages; Grand.Business.Messages resolves System.Security.Cryptography.Pkcs 10.0.13.
  2. dotnet test src/Tests/Grand.Web.Common.Tests: all tests pass, including OidcProfileSynchronizerTests.
  3. Optional: configure OIDC login, sign in with an account whose provider e-mail belongs to another customer, and check that the warning in System → Log names the customer ids only.

… of OIDC sync logs

MailKit 4.18.1 pulls System.Security.Cryptography.Pkcs 10.0.0 transitively; pin the
serviced 10.0.13 release next to the existing Cryptography.Xml pin.

The OpenID Connect profile synchronizer logged the customer's current and the identity
provider's e-mail address when it refused to change it; the customer ids are enough.
Copilot AI balanced review requested due to automatic review settings October 24, 2026 05:43

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

…phy.Pkcs

MailKit 4.18.2 depends on MimeKit 4.18.2, which requires System.Security.Cryptography.Pkcs
10.0.13, so the explicit pin is no longer needed.
@KrzysztofPajak KrzysztofPajak changed the title Pin System.Security.Cryptography.Pkcs to 10.0.13 and keep e-mails out of OIDC sync logs Update MailKit to 4.18.2 and keep e-mails out of OIDC sync logs Oct 24, 2026
@KrzysztofPajak
KrzysztofPajak merged commit 6a1b29c into develop Oct 24, 2026
9 checks passed
@KrzysztofPajak
KrzysztofPajak deleted the fix/vulnerable-pkcs-and-oidc-email-logs branch October 24, 2026 07:27
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