Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 2 fixed, 4 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-327.
Summary
The default BKS keystore use an HMAC that is only 16 bits long, which can allow an attacker to compromise the integrity of a BKS keystore. Bouncy Castle release 1.47 changes the BKS format to a format which uses a 160 bit HMAC instead. This applies to any BKS keystore generated prior to BC 1.47. For situations where people need to create the files for legacy reasons a specific keystore type "BKS-V1" was introduced in 1.49. It should be noted that the use of "BKS-V1" is discouraged by the library authors and should only be used where it is otherwise safe to do so, as in where the use of a 16 bit checksum for the file integrity check is not going to cause a security issue in itself.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Legion of the Bouncy Castle Inc. | Bouncy Castle | all to before 1.47 | 1.47 | Patch available | CNA |
| — | org.bouncycastle:bcprov-jdk15on (Maven) | before 1.50 | 1.50 | Patch available | GHSA-8477-3v39-ggpm |
- Bouncy Castle VendorLegion of the Bouncy Castle Inc. Affected all to before 1.47 Fixed in 1.47 Patch available CNA
- org.bouncycastle:bcprov-jdk15on (Maven) Vendor— Affected before 1.50 Fixed in 1.50 Patch available GHSA-8477-3v39-ggpm
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:bouncycastle:bc-java:*:*:*:*:*:*:*:* | up to 1.49 | Vulnerable | Legion of the Bouncy Castle Inc. |
| cpe:2.3:a:redhat:satellite:6.4:*:*:*:*:*:*:* | 6.4 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:satellite_capsule:6.4:*:*:*:*:*:*:* | 6.4 | Vulnerable | Red Hat |
- cpe:2.3:a:bouncycastle:bc-java:*:*:*:*:*:*:*:* Versions up to 1.49 Vulnerable ·Legion of the Bouncy Castle Inc.
- cpe:2.3:a:redhat:satellite:6.4:*:*:*:*:*:*:* Versions 6.4 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:satellite_capsule:6.4:*:*:*:*:*:*:* Versions 6.4 Vulnerable ·Red Hat
Remediation
- Fix · CNA Bouncy Castle (Legion of the Bouncy Castle) Fixed in 1.47
- Fix · GHSA-8477-3v39-ggpm org.bouncycastle:bcprov-jdk15on (Maven) Fixed in 1.50 Advisory →
Red Hat 1 advisory
- RHSA-2018:2927 Released 2018-10-16 · Red Hat rating ImportantSatellite 6.4 security, bug fix, and enhancement update
- Red Hat Satellite 6.4 SOAPpy-0.11.6-17.el7, ansiblerole-insights-client-1.5-1.el7sat, candlepin-2.4.8-1.el7 +47
- Red Hat Satellite Capsule 6.4 SOAPpy-0.11.6-17.el7, ansiblerole-insights-client-1.5-1.el7sat, createrepo_c-0.7.4-1.el7sat +47
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat JBoss Data Virtualization 6 | Affected | No fix planned: Out of support scope |
| Red Hat JBoss Enterprise Application Platform 7 | Affected | No fix yet |
| Red Hat Subscription Asset Manager | Affected | No fix planned: Will not fix |
| streams for Apache Kafka | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6.4 | Fixed | RHSA-2018:2927 |
| Red Hat Satellite Capsule 6.4 | Fixed | RHSA-2018:2927 |
Not affected: 2 products
- Red Hat Software Collections
- Red Hat Virtualization 4
Timeline
- 2026-10-02 Threatist record created from CVE-2018-5382
- 2026-10-03 Alias added: GHSA-8477-3v39-ggpm
References
More Legion of the Bouncy Castle Inc. Bc-java vulnerabilities
- TI-2018-15967 Legion of the Bouncy Castle Legion of the Bouncy Castle Java Cryptography APIs 1.58 up to… CVSS 3.1CRITICAL 9.8
- TI-2017-09736 BouncyCastle JCE TLS Bleichenbacher/ROBOT CVSS 3.0HIGH 7.5
- TI-2026-42545 MTI/A0 DH agreement exponentiates unvalidated peer value CVSS 4.0CRITICAL 9.3
- TI-2026-42533 JSSE hostname verifier CN-fallback enabled by default despite documented opt-in CVSS 4.0CRITICAL 9.3
- TI-2026-41816 Stapled OCSP response accepted without binding to the checked certificate CVSS 4.0CRITICAL 9.3
- TI-2026-07701 Name Constraints bypass via trailing dot in rfc822Name and URI CVSS 4.0CRITICAL 9.3
Sources
- CVE-2018-5382 · CVE Program
- CVE-2018-5382 · NVD
- FIRST EPSS
- GHSA-8477-3v39-ggpm · GitHub Advisory Database · CC BY 4.0
- CVE-2018-5382 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences