Intel

AIKIDO-2026-282160

BouncyCastle.Cryptography is vulnerable to Improper Input Validation

CVE-2026-63569Published Oct 23, 2026
October 23, 2026

91

CVE Score

Critical

Improper Input Validation

Are you affected? Scan for Free

TL;DR

Bouncy Castle's DHAgreement.CalculateAgreement raises a peer-supplied ephemeral value to the local static private key without first validating its range or subgroup membership. An on-path attacker can force a shared secret they already know and defeat MTI/A0 key authentication, while a malicious peer can use small-order values to leak or recover the static private key.

How do I fix this?

Upgrade the BouncyCastle.Cryptography package to the patch version. If an immediate upgrade is not possible, validate the peer's ephemeral value by constructing a DHPublicKeyParameters with the same domain parameters before passing it to CalculateAgreement, and abandon the exchange if validation fails.

Who does this affect?

You are affected if your application calls DHAgreement directly for MTI/A0 Diffie-Hellman and accepts peer-controlled agreement values. Bouncy Castle's own TLS and agreement factory code uses DHBasicAgreement and is not affected.

Versions

2.0.0 - 2.6.2

Fixed in 2.7.0

Background info

BouncyCastle.Cryptography is vulnerable to Improper Input Validation in versions 2.0.0 - 2.6.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea