Skip to content
CVE IDCVE-2024-29857GitHub advisory IDGHSA-8xfc-gm6g-vgpv

Bouncy Castle certificate parsing issues cause high CPU usage during parameter evaluation.

CVE-2024-29857 (GitHub advisory GHSA-8xfc-gm6g-vgpv) is a medium-severity vulnerability with a CVSS 3.1 base score of 5.3, classed as Out-of-bounds Read (CWE-125), in 10 packages, including org.bouncycastle:bcprov-jdk18on (Maven) and org.bouncycastle:bcprov-jdk15on (Maven). Fixed versions: org.bouncycastle:bcprov-jdk18on 1.78; org.bouncycastle:bcprov-jdk15on 1.78; and 7 more packages.

Medium5.3Fix availableGitHub reviewed

Published 9 May 2024Updated 13 Feb 2025

5.3MediumCVSS 3.1
EPSS
1.09%higher than 63% of CVEs
Weaknesses (CWE)
KEV status
Not in KEV
Published
9 May 2024
Updated
13 Feb 2025
Ecosystems
  • Maven
  • NuGet
Assigned by (CNA)
mitre

Summary

Source: OSV (GitHub advisory)

An issue was discovered in ECCurve.java and ECCurve.cs in Bouncy Castle Java (BC Java) before 1.78, BC Java LTS before 2.73.6, BC-FJA before 1.0.2.5, and BC C# .Net before 2.3.1. Importing an EC certificate with crafted F2m parameters can lead to excessive CPU consumption during the evaluation of the curve parameters.

Technical details

Source: GitHub Advisory Database

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

Medium5.3Base score from GitHub Advisory Database

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

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.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
  • org.bouncycastle:bc-fips
    Maven
    pkg:maven/org.bouncycastle/bc-fips
    Affected versions
    < 1.0.2.5
    Fixed in
    1.0.2.5
    Show 6 listed versions
    • 1.0.0
    • 1.0.1
    • 1.0.2
    • 1.0.2.1
    • 1.0.2.3
    • 1.0.2.4
  • 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-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
  • org.bouncycastle:bc-fips: upgrade to 1.0.2.5 or later
  • BouncyCastle.Cryptography: upgrade to 2.3.1 or later

Not fixed yet for: BouncyCastle.

Patch commits

  • 56daa6ePatch commitgithub.com/bcgit/bc-csharp

    Restrict m value in F2m curves

    +31 −7 across 2 files

    • crypto/src/math/ec/ECCurve.cs+11 −7
    • crypto/test/src/math/ec/test/ECPointTest.cs+20 −0
  • efc498cPatch commitgithub.com/bcgit/bc-java

    added bounds check on f2m field size.

    +5 −0 across 1 file

    • core/src/main/java/org/bouncycastle/math/ec/ECCurve.java+5 −0
  • fee80ddPatch commitgithub.com/bcgit/bc-java

    refactored f2m m check.

    +24 −5 across 2 files

    • core/src/main/java/org/bouncycastle/math/ec/ECCurve.java+5 −5
    • core/src/test/java/org/bouncycastle/math/ec/test/ECPointTest.java+19 −0

Vulnerability intelligence

References

Credits

Questions about CVE-2024-29857

What is the GHSA ID for CVE-2024-29857?
GitHub tracks CVE-2024-29857 as GHSA-8xfc-gm6g-vgpv.
What is the CVSS score of CVE-2024-29857?
CVE-2024-29857 has a CVSS 3.1 base score of 5.3 (Medium), vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. Other published scores: CVSS 3.1 7.5.
Which versions are affected by CVE-2024-29857?
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. org.bouncycastle:bctls-jdk14 (Maven): < 1.78. 4 more packages are listed on the page.
How do I fix CVE-2024-29857?
Upgrade each package to its fixed version: org.bouncycastle:bcprov-jdk18on 1.78; org.bouncycastle:bcprov-jdk15on 1.78; org.bouncycastle:bcprov-jdk15to18 1.78; org.bouncycastle:bcprov-jdk14 1.78; and 5 more packages. The fix is in commits 56daa6e, efc498c and fee80dd.
What is the Package URL (PURL) for CVE-2024-29857?
The affected packages' PURLs are pkg:maven/org.bouncycastle/bcprov-jdk18on, pkg:maven/org.bouncycastle/bcprov-jdk15on, pkg:maven/org.bouncycastle/bcprov-jdk15to18, pkg:maven/org.bouncycastle/bcprov-jdk14, pkg:maven/org.bouncycastle/bctls-jdk18on and pkg:maven/org.bouncycastle/bctls-jdk14 and more.
Is CVE-2024-29857 exploited in the wild?
CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2024-29857. 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 1.09% chance of exploitation in the next 30 days, higher than 63% 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 5 days ago (10 Oct 2026, 03:50 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.