Skip to content
CVE IDCVE-2024-30172GitHub advisory IDGHSA-m44j-cfrm-g8qc

Bouncy Castle crafted signature and public key can be used to trigger an infinite loop

CVE-2024-30172 (GitHub advisory GHSA-m44j-cfrm-g8qc) is a medium-severity vulnerability with a CVSS 4.0 base score of 6.9, classed as Loop with Unreachable Exit Condition ('Infinite Loop') (CWE-835), in 8 packages, including org.bouncycastle:bcprov-jdk18on (Maven) and org.bouncycastle:bcprov-jdk15to18 (Maven). Fixed versions: org.bouncycastle:bcprov-jdk18on 1.78; org.bouncycastle:bcprov-jdk15to18 1.78; and 5 more packages.

Medium6.9Fix availableGitHub reviewed

Published 9 May 2024Updated 2 Dec 2024

6.9MediumCVSS 4.0
EPSS
0.75%higher than 53% of CVEs
Weakness (CWE)
  • CWE-835Loop with Unreachable Exit Condition ('Infinite Loop')
KEV status
Not in KEV
Published
9 May 2024
Updated
2 Dec 2024
Ecosystems
  • Maven
  • NuGet
Assigned by (CNA)
mitre

Summary

Source: OSV (GitHub advisory)

An issue was discovered in Bouncy Castle Java Cryptography APIs starting in 1.73 and before 1.78. An Ed25519 verification code infinite loop can occur via a crafted signature and public key.

Technical details

Source: GitHub Advisory Database

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Medium6.9Base score from GitHub Advisory Database

Attack Vector AV
Network
Attack Complexity AC
Low
Attack Requirements AT
None
Privileges Required PR
None
User Interaction UI
None
Confidentiality (Vulnerable System) VC
None
Integrity (Vulnerable System) VI
None
Availability (Vulnerable System) VA
Low
Confidentiality (Subsequent Systems) SC
None
Integrity (Subsequent Systems) SI
None
Availability (Subsequent Systems) SA
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:bcprov-jdk18on
    Maven
    pkg:maven/org.bouncycastle/bcprov-jdk18on
    Affected versions
    >= 1.73, < 1.78
    Fixed in
    1.78
    Show 5 listed versions
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • org.bouncycastle:bcprov-jdk15to18
    Maven
    pkg:maven/org.bouncycastle/bcprov-jdk15to18
    Affected versions
    >= 1.73, < 1.78
    Fixed in
    1.78
    Show 5 listed versions
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • org.bouncycastle:bcprov-jdk14
    Maven
    pkg:maven/org.bouncycastle/bcprov-jdk14
    Affected versions
    >= 1.73, < 1.78
    Fixed in
    1.78
    Show 5 listed versions
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • org.bouncycastle:bctls-jdk18on
    Maven
    pkg:maven/org.bouncycastle/bctls-jdk18on
    Affected versions
    >= 1.73, < 1.78
    Fixed in
    1.78
    Show 5 listed versions
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • org.bouncycastle:bctls-jdk14
    Maven
    pkg:maven/org.bouncycastle/bctls-jdk14
    Affected versions
    >= 1.73, < 1.78
    Fixed in
    1.78
    Show 5 listed versions
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • org.bouncycastle:bctls-jdk15to18
    Maven
    pkg:maven/org.bouncycastle/bctls-jdk15to18
    Affected versions
    >= 1.73, < 1.78
    Fixed in
    1.78
    Show 5 listed versions
    • 1.73
    • 1.74
    • 1.75
    • 1.76
    • 1.77
  • 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:bcprov-jdk18on: 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

  • 1b9fd9bPatch commitgithub.com/bcgit/bc-java

    EdDSA improvements from bc-csharp

    +2554 −1096 across 17 files

    • core/src/main/java/org/bouncycastle/crypto/params/Ed25519PrivateKeyParameters.java+1 −3
    • core/src/main/java/org/bouncycastle/crypto/params/Ed25519PublicKeyParameters.java+35 −8
    • core/src/main/java/org/bouncycastle/crypto/params/Ed448PrivateKeyParameters.java+1 −3
    • core/src/main/java/org/bouncycastle/crypto/params/Ed448PublicKeyParameters.java+34 −7
    • core/src/main/java/org/bouncycastle/math/ec/rfc7748/X25519Field.java+26 −0
    • core/src/main/java/org/bouncycastle/math/ec/rfc7748/X448Field.java+49 −1
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Codec.java+65 −0
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Ed25519.java+463 −398
    • and 9 more files
  • 9c16579Patch commitgithub.com/bcgit/bc-java

    Fix for EdDSA verification infinite loop

    +164 −54 across 3 files

    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Scalar25519.java+3 −2
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Scalar448.java+3 −2
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/ScalarUtil.java+158 −50
  • ebe1c75Patch commitgithub.com/bcgit/bc-java

    EdDSA: Explicit guard against infinite looping

    +56 −20 across 5 files

    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Ed25519.java+12 −2
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Ed448.java+12 −2
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Scalar25519.java+9 −1
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/Scalar448.java+9 −1
    • core/src/main/java/org/bouncycastle/math/ec/rfc8032/ScalarUtil.java+14 −14

Vulnerability intelligence

References

Credits

Questions about CVE-2024-30172

What is the GHSA ID for CVE-2024-30172?
GitHub tracks CVE-2024-30172 as GHSA-m44j-cfrm-g8qc.
What is the CVSS score of CVE-2024-30172?
CVE-2024-30172 has a CVSS 4.0 base score of 6.9 (Medium), vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N. Other published scores: CVSS 3.1 5.3, CVSS 3.1 7.5.
Which versions are affected by CVE-2024-30172?
org.bouncycastle:bcprov-jdk18on (Maven): >= 1.73, < 1.78. org.bouncycastle:bcprov-jdk15to18 (Maven): >= 1.73, < 1.78. org.bouncycastle:bcprov-jdk14 (Maven): >= 1.73, < 1.78. org.bouncycastle:bctls-jdk18on (Maven): >= 1.73, < 1.78. org.bouncycastle:bctls-jdk14 (Maven): >= 1.73, < 1.78. org.bouncycastle:bctls-jdk15to18 (Maven): >= 1.73, < 1.78. 2 more packages are listed on the page.
How do I fix CVE-2024-30172?
Upgrade each package to its fixed version: org.bouncycastle:bcprov-jdk18on 1.78; org.bouncycastle:bcprov-jdk15to18 1.78; org.bouncycastle:bcprov-jdk14 1.78; org.bouncycastle:bctls-jdk18on 1.78; and 3 more packages. The fix is in commits 1b9fd9b, 9c16579 and ebe1c75.
What is the Package URL (PURL) for CVE-2024-30172?
The affected packages' PURLs are pkg:maven/org.bouncycastle/bcprov-jdk18on, pkg:maven/org.bouncycastle/bcprov-jdk15to18, pkg:maven/org.bouncycastle/bcprov-jdk14, pkg:maven/org.bouncycastle/bctls-jdk18on, pkg:maven/org.bouncycastle/bctls-jdk14 and pkg:maven/org.bouncycastle/bctls-jdk15to18 and more.
Is CVE-2024-30172 exploited in the wild?
CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2024-30172. 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.75% chance of exploitation in the next 30 days, higher than 53% 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:58 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.