CVE-2024-14041
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedIn Bouncy Castle for Java from 1.73 to before 1.78, three ML-KEM (CRYSTALS-Kyber) routines divided secret-derived polynomial coefficients by the modulus q: Poly.toMsg, which decodes the decrypted message, and the ciphertext compression routines Poly.compressPoly and PolyVec.compressPolyVec. An attacker able to measure the timing of a large number of decapsulations performed with the same long-term private key can recover that key. These are the KyberSlash1 (Poly.toMsg) and KyberSlash2 (ciphertext compression) divisions. Compression performed during encapsulation operates on values that become the public ciphertext and is not affected.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceTiming side-channel vulnerability in Bouncy Castle's ML-KEM (CRYSTALS-Kyber) implementation where division operations on secret-derived polynomial coefficients in Poly.toMsg, Poly.compressPoly, and PolyVec.compressPolyVec leak information through execution time variations, allowing an attacker to recover the long-term private key by measuring timing of many decapsulation operations.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- High
- Privileges
- None
- Authentication
- X
- User interaction
- None
- Scope
- X
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Bouncy Castle Java library versionLocate the bcprov*.jar or bouncycastle*.jar file in your classpath or dependency management (Maven pom.xml, Gradle build.gradle, or the JAR file itself). Check the MANIFEST.MF file inside the JAR for the Implementation-Version attribute, or check your dependency declaration for the version number.Affected if The version is earlier than 1.78 (for example, 1.77, 1.76, etc.)
-
Confirm ML-KEM/Kyber key generation or decapsulation is in useReview your application code for imports from org.bouncycastle.pqc.crypto.crystals kyber (or org.bouncycastle.pqc.jcajce.provider.* for older APIs). Search for usage of KYBERKeyGenParameterSpec, KyberPrivateKey, KyberPublicKey, or the ML-KEM algorithms in your key generation, encapsulation, or decapsulation workflows.Affected if Your application performs ML-KEM (Kyber) key generation, encapsulation, or decapsulation operations using Bouncy Castle.
-
Identify usage of vulnerable methods in ciphertext processingIf using the ML-KEM API, determine whether your code calls methods that trigger Poly.toMsg, Poly.compressPoly, or PolyVec.compressPolyVec. This occurs during decapsulation (using the private key to decrypt ciphertext) or when compressing polynomial vectors. Review stack traces or debug logs if available to confirm these code paths are exercised.Affected if Your application performs ML-KEM decapsulation or ciphertext decompression operations, which invoke the vulnerable polynomial coefficient processing routines.
You are affected if you are using Bouncy Castle Java version earlier than 1.78 and your application performs ML-KEM/Kyber decapsulation or ciphertext compression operations using the Bouncy Castle library.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade Bouncy Castle for Java to version 1.78 or later which contains the fix for the KyberSlash1 and KyberSlash2 timing vulnerabilities in the ML-KEM decapsulation and ciphertext decompression routines.
1.78 or later
- Check the current Bouncy Castle Java version in use by examining project dependencies (Maven pom.xml, Gradle build.gradle, or similar)
- Upgrade the bouncycastle dependency to version 1.78 or later. For Maven, update the pom.xml: <artifactId>bcpkix-jdk15on</artifactId> <version>1.78</version> or use the latest stable version from https://mvnrepository.com/artifact/org.bouncycastle
- For Gradle, update to: implementation 'org.bouncycastle:bcpkix-jdk15on:1.78' or use the latest version
- After upgrading, rebuild and test the application to ensure no compilation errors or runtime issues
- If using an older fork or alternative Bouncy Castle distribution, ensure the replacement also includes the fix for CVE-2024-14041
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing8.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,288.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-14041 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-14041 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data