CVE-2017-13098: Bouncy Castle Observable Discrepancy Vulnerability

MODERATE
Advisory Identifier: GHSA-wrwf-pmmj-w989
CVSS 5.9
CWE-203
Published
Advisory Summary

CVE-2017-13098 is a MODERATE (CVSS 5.9) observable discrepancy vulnerability (CWE-203: Observable Discrepancy) affecting Bouncy Castle libraries in the Maven ecosystem. The issue involves observable discrepancy in bouncycastle. Remediation is available by upgrading affected packages to version 1.0.3.

CVE-2017-13098 at a Glance

CVE Identifier CVE-2017-13098
GHSA Identifier GHSA-wrwf-pmmj-w989
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-203: Observable Discrepancy
Affected Product Bouncy Castle
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2017-13098

To remediate this vulnerability, upgrade all affected Bouncy Castle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.bouncycastle:bcprov-jdk15on fixed: 1.0.3
<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk15on</artifactId>
    <version>1.0.3</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.bouncycastle

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2017-13098, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.bouncycastle

Analyze the terminal output to locate any version of Bouncy Castle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.bouncycastle command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Bouncy Castle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

BouncyCastle TLS prior to version 1.0.3, when configured to use the JCE (Java Cryptography Extension) for cryptographic functions, provides a weak Bleichenbacher oracle when any TLS cipher suite using RSA key exchange is negotiated. An attacker can recover the private key from a vulnerable application. This vulnerability is referred to as "ROBOT."

CVE-2017-13098 Affected Bouncy Castle Versions

1 component(s)
Fixed Versions:
1.0.3
Product / Package Ecosystem Affected Versions Fixed Version
org.bouncycastle:bcprov-jdk15on
Maven
< 1.0.3
1.0.3

References

Frequently Asked Questions

What is CVE-2017-13098?
CVE-2017-13098 is a security vulnerability in Bouncy Castle involving Observable Discrepancy in BouncyCastle under CWE-203: Observable Discrepancy.
Which Bouncy Castle versions are affected?
Affected versions include releases prior to 1.0.3 across affected packages: org.bouncycastle:bcprov-jdk15on.
What version fixes CVE-2017-13098?
Upgrading to 1.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bcprov-jdk15on affected?
Yes, org.bouncycastle:bcprov-jdk15on is affected in releases prior to 1.0.3. Upgrade your dependency to 1.0.3 or later.
What is the CVSS score of CVE-2017-13098?
CVE-2017-13098 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2017-13098?
CVE-2017-13098 is classified under CWE-203: Observable Discrepancy (The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.).
How can I check Maven dependencies for CVE-2017-13098?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.bouncycastle'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wrwf-pmmj-w989",
  "modified" : "2022-07-01T20:14:25Z",
  "published" : "2022-05-13T01:14:24Z",
  "aliases" : [ "CVE-2017-13098" ],
  "summary" : "Observable Discrepancy in BouncyCastle",
  "details" : "BouncyCastle TLS prior to version 1.0.3, when configured to use the JCE (Java Cryptography Extension) for cryptographic functions, provides a weak Bleichenbacher oracle when any TLS cipher suite using RSA key exchange is negotiated. An attacker can recover the private key from a vulnerable application. This vulnerability is referred to as \"ROBOT.\"",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bouncycastle:bcprov-jdk15on"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-13098"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bcgit/bc-java/commit/a00b684465b38d722ca9a3543b8af8568e6bad5c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bcgit/bc-java"
  }, {
    "type" : "WEB",
    "url" : "https://robotattack.org"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20171222-0001"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2017/dsa-4072"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00011.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.kb.cert.org/vuls/id/144389"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-203" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-01T20:14:25Z",
    "nvd_published_at" : "2017-12-13T01:29:00Z"
  }
}