CVE-2020-15522 Overview
CVE-2020-15522 is a timing side-channel vulnerability affecting multiple Bouncy Castle cryptographic library implementations across Java and .NET platforms. The vulnerability exists within the EC (Elliptic Curve) math library and can expose private key information when an attacker is able to observe timing variations during the generation of multiple deterministic ECDSA signatures.
This vulnerability represents a significant concern for applications relying on Bouncy Castle for cryptographic operations, as successful exploitation could lead to the recovery of private keys used in ECDSA signature operations.
Critical Impact
Attackers capable of observing timing information during ECDSA signature generation may extract private key material, compromising the confidentiality of cryptographic operations and potentially enabling signature forgery or decryption of protected communications.
Affected Products
- Bouncy Castle BC Java before version 1.66
- Bouncy Castle BC C# .NET before version 1.8.7
- Bouncy Castle BC-FJA (FIPS Java API) before versions 1.0.1.2 and 1.0.2.1
- Bouncy Castle BC-FNA (FIPS .NET API) before version 1.0.1.1
Discovery Timeline
- 2021-05-20 - CVE-2020-15522 published to NVD
- 2025-07-17 - Last updated in NVD database
Technical Details for CVE-2020-15522
Vulnerability Analysis
This vulnerability is classified as a timing side-channel attack (CWE-362 - Race Condition) affecting the elliptic curve mathematics implementation in Bouncy Castle cryptographic libraries. The flaw arises from non-constant-time operations within the EC math routines used during ECDSA signature generation.
When generating deterministic ECDSA signatures (as specified in RFC 6979), the library performs scalar multiplication operations on elliptic curve points. These operations should execute in constant time to prevent timing analysis attacks. However, vulnerable versions of Bouncy Castle exhibit timing variations that correlate with the bits of the private key being used.
An attacker who can measure the time taken to generate multiple signatures with the same private key can statistically analyze these timing differences. Through techniques such as lattice-based cryptanalysis, the attacker may reconstruct portions of the private key or recover it entirely, depending on the number of observed signatures.
The attack requires network-level access to observe timing differences, making it most relevant in scenarios where an attacker can either directly measure signature generation time or infer it through network latency measurements.
Root Cause
The root cause of CVE-2020-15522 lies in the implementation of elliptic curve scalar multiplication within the Bouncy Castle EC math library. Specifically, the library did not implement constant-time algorithms for certain EC operations, resulting in execution time variations that depend on the secret scalar (private key) values.
Constant-time implementation is a critical requirement for cryptographic operations to prevent side-channel attacks. The affected code paths allow timing measurements to leak information about the private key through observable differences in computation duration.
Attack Vector
The attack vector for this vulnerability is network-based, requiring the attacker to observe timing information from multiple ECDSA signature operations. The attack scenario typically involves:
- The attacker positions themselves to measure signature generation times, either through network latency observations or local timing measurements
- Multiple signatures are generated using the target private key
- Timing variations are collected and statistically analyzed
- Lattice-based techniques are applied to recover private key bits from the timing data
The vulnerability requires high attack complexity as the attacker must collect numerous timing samples and apply sophisticated cryptanalytic techniques. No user interaction is required, and the attacker needs no prior privileges to execute this attack.
Detection Methods for CVE-2020-15522
Indicators of Compromise
- Unusual patterns of repeated signature requests to cryptographic endpoints using ECDSA
- Network traffic analysis showing systematic probing of signature generation timing
- Elevated volume of signature operations from specific sources attempting timing correlation
- Anomalous latency measurement attempts targeting cryptographic services
Detection Strategies
- Monitor for excessive ECDSA signature generation requests from individual sources that may indicate timing analysis attempts
- Implement application-level logging to track signature operation frequency and source patterns
- Deploy network intrusion detection rules to identify potential timing attack reconnaissance patterns
- Audit software bill of materials (SBOM) to identify applications using vulnerable Bouncy Castle versions
Monitoring Recommendations
- Establish baseline metrics for cryptographic operation timing and alert on statistical anomalies
- Configure security information and event management (SIEM) systems to correlate signature-related events
- Monitor dependency management systems for alerts regarding vulnerable Bouncy Castle library versions
- Implement continuous vulnerability scanning to detect outdated cryptographic libraries in the environment
How to Mitigate CVE-2020-15522
Immediate Actions Required
- Upgrade Bouncy Castle BC Java to version 1.66 or later
- Upgrade Bouncy Castle BC C# .NET to version 1.8.7 or later
- Upgrade Bouncy Castle BC-FJA to version 1.0.1.2 or 1.0.2.1 or later
- Upgrade Bouncy Castle BC-FNA to version 1.0.1.1 or later
- Conduct a thorough inventory of all applications using Bouncy Castle libraries
Patch Information
Bouncy Castle has released patched versions that implement constant-time EC math operations, eliminating the timing side-channel. The fixes are documented in the Bouncy Castle Release Notes.
For detailed technical information about the vulnerability and remediation, refer to:
- GitHub CVE-2020-15522 Wiki - Java
- GitHub CVE-2020-15522 Wiki - C#
- NetApp Security Advisory NTAP-20210622-0007
Organizations should prioritize updating the library across all affected applications and verify the update through dependency scanning tools.
Workarounds
- If immediate patching is not possible, consider implementing network-level rate limiting on signature generation endpoints
- Add artificial random timing jitter to signature responses as a temporary measure (note: this is not a complete fix)
- Restrict network access to cryptographic services to trusted sources only
- Consider temporarily switching to non-ECDSA signature algorithms if operationally feasible
- Monitor signature operations closely until patches can be applied
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


