Skip to content
CVE IDCVE-2024-30171GitHub advisory IDGHSA-v435-xc8x-wvr9

Bouncy Castle affected by timing side-channel for RSA key exchange ("The Marvin Attack")

CVE-2024-30171 (GitHub advisory GHSA-v435-xc8x-wvr9) is a medium-severity vulnerability with a CVSS 3.1 base score of 5.9, classed as Observable Discrepancy (CWE-203), in 10 packages, including org.bouncycastle:bctls-fips (Maven) and org.bouncycastle:bcprov-jdk18on (Maven). Fixed versions: org.bouncycastle:bctls-fips 1.0.19; org.bouncycastle:bcprov-jdk18on 1.78; and 7 more packages.

Medium5.9Fix availableGitHub reviewed

Published 9 May 2024Updated 9 Sept 2024

5.9MediumCVSS 3.1
EPSS
0.9%higher than 57% of CVEs
Weakness (CWE)
KEV status
Not in KEV
Published
9 May 2024
Updated
9 Sept 2024
Ecosystems
  • Maven
  • NuGet
Assigned by (CNA)
mitre

Summary

Source: OSV (GitHub advisory)

An issue was discovered in Bouncy Castle Java TLS API and JSSE Provider before 1.78. Timing-based leakage may occur in RSA based handshakes because of exception processing.

Technical details

Source: GitHub Advisory Database

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Medium5.9Base score from GitHub Advisory Database

Attack Vector AV
Network
Attack Complexity AC
High
Privileges Required PR
None
User Interaction UI
None
Scope S
Unchanged
Confidentiality C
High
Integrity I
None
Availability A
None

CISA SSVC decision points

Exploitation
none
No public exploitation evidence
Automatable
no
Needs manual steps per target
Technical impact
partial
Limited control of the affected system

CISA Coordinator assessment (SSVC 2.0.3) via CVE.org.

Affected packages

Source: OSV (GitHub advisory)

  • org.bouncycastle:bctls-fips
    Maven
    pkg:maven/org.bouncycastle/bctls-fips
    Affected versions
    < 1.0.19
    Fixed in
    1.0.19
    Show 29 listed versions
    • 1.0.0
    • 1.0.1
    • 1.0.10
    • 1.0.10.1
    • 1.0.10.2
    • 1.0.10.3
    • 1.0.11
    • 1.0.11.1
    • 1.0.11.2
    • 1.0.11.3
    • 1.0.11.4
    • 1.0.12
  • org.bouncycastle:bcprov-jdk18on
    Maven
    pkg:maven/org.bouncycastle/bcprov-jdk18on
    Affected versions
    < 1.78
    Fixed in
    1.78
    Show 8 listed versions
    • 1.71
    • 1.71.1
    • 1.72
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • org.bouncycastle:bcprov-jdk15on
    Maven
    pkg:maven/org.bouncycastle/bcprov-jdk15on
    Affected versions
    < 1.78
    Fixed in
    1.78
    Show 26 listed versions
    • 1.46
    • 1.47
    • 1.48
    • 1.49
    • 1.50
    • 1.51
    • 1.52
    • 1.53
    • 1.54
    • 1.55
    • 1.56
    • 1.57
  • org.bouncycastle:bcprov-jdk15to18
    Maven
    pkg:maven/org.bouncycastle/bcprov-jdk15to18
    Affected versions
    < 1.78
    Fixed in
    1.78
    Show 15 listed versions
    • 1.63
    • 1.64
    • 1.65
    • 1.66
    • 1.67
    • 1.68
    • 1.69
    • 1.70
    • 1.71
    • 1.72
    • 1.73
    • 1.74
  • org.bouncycastle:bcprov-jdk14
    Maven
    pkg:maven/org.bouncycastle/bcprov-jdk14
    Affected versions
    < 1.78
    Fixed in
    1.78
    Show 34 listed versions
    • 1.38
    • 1.43
    • 1.44
    • 1.45
    • 1.46
    • 1.47
    • 1.48
    • 1.49
    • 1.50
    • 1.51
    • 1.53
    • 1.54
  • org.bouncycastle:bctls-jdk18on
    Maven
    pkg:maven/org.bouncycastle/bctls-jdk18on
    Affected versions
    < 1.78
    Fixed in
    1.78
    Show 8 listed versions
    • 1.71
    • 1.71.1
    • 1.72
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • org.bouncycastle:bctls-jdk14
    Maven
    pkg:maven/org.bouncycastle/bctls-jdk14
    Affected versions
    < 1.78
    Fixed in
    1.78
    Show 16 listed versions
    • 1.61
    • 1.62
    • 1.63
    • 1.64
    • 1.65
    • 1.67
    • 1.68
    • 1.69
    • 1.70
    • 1.71
    • 1.72
    • 1.73
  • org.bouncycastle:bctls-jdk15to18
    Maven
    pkg:maven/org.bouncycastle/bctls-jdk15to18
    Affected versions
    < 1.78
    Fixed in
    1.78
    Show 15 listed versions
    • 1.63
    • 1.64
    • 1.65
    • 1.66
    • 1.67
    • 1.68
    • 1.69
    • 1.70
    • 1.71
    • 1.72
    • 1.73
    • 1.74
  • BouncyCastle
    NuGet
    pkg:nuget/BouncyCastle
    Affected versions
    < 2.3.1
    Fixed in
    No fix yet
    Show 10 listed versions
    • 1.7.0
    • 1.8.1
    • 1.8.2
    • 1.8.3
    • 1.8.3.1
    • 1.8.4
    • 1.8.5
    • 1.8.6
    • 1.8.6.1
    • 1.8.9
  • BouncyCastle.Cryptography
    NuGet
    pkg:nuget/BouncyCastle.Cryptography
    Affected versions
    < 2.3.1
    Fixed in
    2.3.1
    Show 6 listed versions
    • 2.0.0
    • 2.1.0
    • 2.1.1
    • 2.2.0
    • 2.2.1
    • 2.3.0

Fix

Source: OSV (GitHub advisory)

Fix available

  • org.bouncycastle:bctls-fips: upgrade to 1.0.19 or later
  • org.bouncycastle:bcprov-jdk18on: upgrade to 1.78 or later
  • org.bouncycastle:bcprov-jdk15on: upgrade to 1.78 or later
  • org.bouncycastle:bcprov-jdk15to18: upgrade to 1.78 or later
  • org.bouncycastle:bcprov-jdk14: upgrade to 1.78 or later
  • org.bouncycastle:bctls-jdk18on: upgrade to 1.78 or later
  • org.bouncycastle:bctls-jdk14: upgrade to 1.78 or later
  • org.bouncycastle:bctls-jdk15to18: upgrade to 1.78 or later
  • BouncyCastle.Cryptography: upgrade to 2.3.1 or later

Not fixed yet for: BouncyCastle.

Patch commits

  • c984b8bPatch commitgithub.com/bcgit/bc-csharp

    Improve TLS RSA PreMasterSecret decryption

    +23 −20 across 2 files

    • crypto/src/crypto/tls/TlsRsaKeyExchange.cs+20 −18
    • crypto/src/tls/crypto/impl/bc/BcDefaultTlsCredentialedDecryptor.cs+3 −2
  • d7d5e73Patch commitgithub.com/bcgit/bc-java

    added new RSA mode for better TLS unwrap operation relates to github #1528

    +107 −35 across 3 files

    • prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/CipherSpi.java+41 −3
    • prov/src/main/java/org/bouncycastle/jcajce/spec/TLSRSAPremasterSecretParameterSpec.java+19 −0
    • tls/src/main/java/org/bouncycastle/tls/crypto/impl/jcajce/JceDefaultTlsCredentialedDecryptor.java+47 −32
  • e0569dcPatch commitgithub.com/bcgit/bc-java

    Improvements to PKCS1Encoding

    +402 −133 across 3 files

    • core/src/main/java/org/bouncycastle/crypto/encodings/PKCS1Encoding.java+115 −119
    • prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/CipherSpi.java+24 −14
    • prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/CustomPkcs1Encoding.java+263 −0

Vulnerability intelligence

References

Credits

Questions about CVE-2024-30171

What is the GHSA ID for CVE-2024-30171?
GitHub tracks CVE-2024-30171 as GHSA-v435-xc8x-wvr9.
What is the CVSS score of CVE-2024-30171?
CVE-2024-30171 has a CVSS 3.1 base score of 5.9 (Medium), vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
Which versions are affected by CVE-2024-30171?
org.bouncycastle:bctls-fips (Maven): < 1.0.19. org.bouncycastle:bcprov-jdk18on (Maven): < 1.78. org.bouncycastle:bcprov-jdk15on (Maven): < 1.78. org.bouncycastle:bcprov-jdk15to18 (Maven): < 1.78. org.bouncycastle:bcprov-jdk14 (Maven): < 1.78. org.bouncycastle:bctls-jdk18on (Maven): < 1.78. 4 more packages are listed on the page.
How do I fix CVE-2024-30171?
Upgrade each package to its fixed version: org.bouncycastle:bctls-fips 1.0.19; org.bouncycastle:bcprov-jdk18on 1.78; org.bouncycastle:bcprov-jdk15on 1.78; org.bouncycastle:bcprov-jdk15to18 1.78; and 5 more packages. The fix is in commits c984b8b, d7d5e73 and e0569dc.
What is the Package URL (PURL) for CVE-2024-30171?
The affected packages' PURLs are pkg:maven/org.bouncycastle/bctls-fips, pkg:maven/org.bouncycastle/bcprov-jdk18on, pkg:maven/org.bouncycastle/bcprov-jdk15on, pkg:maven/org.bouncycastle/bcprov-jdk15to18, pkg:maven/org.bouncycastle/bcprov-jdk14 and pkg:maven/org.bouncycastle/bctls-jdk18on and more.
Is CVE-2024-30171 exploited in the wild?
CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2024-30171. That means no confirmed exploitation has been catalogued, not that it is safe to leave unpatched. CISA's SSVC assessment rates exploitation as "none". EPSS estimates a 0.9% chance of exploitation in the next 30 days, higher than 57% of CVEs.

Data sources

Upstream records

  • OSV (GitHub advisory)LoadedRaw JSON
  • GitHub Advisory DatabaseLoadedRaw JSON
  • OSV (CVE record)LoadedRaw JSON
  • CVE.orgLoaded
  • CISA KEV catalogLoaded

Fetched 2 days ago (13 Oct 2026, 13:59 UTC). Records refresh automatically after 24 hours.

Where each part of this page came from

Title and description
OSV (GitHub advisory)
Severity score
GitHub Advisory Database
Weakness (CWE)
GitHub Advisory Database
Affected packages
OSV (GitHub advisory)
Fix
OSV (GitHub advisory)
References
Computed by CVEminer
SSVC
CVE.org
KEV status
CISA KEV catalog
EPSS
GitHub Advisory Database

OSV and GitHub Advisory Database content is licensed CC BY 4.0. Values marked as computed or derived were calculated by CVEminer from the upstream data.