CVE-2018-1000613
Use of Externally-Controlled Input to Select Classes or Code vulnerability in org.bouncycastle:bcprov-jdk15on

Use of Externally-Controlled Input to Select Classes or Code No known exploit

What is CVE-2018-1000613 About?

This vulnerability is an 'Unsafe Reflection' issue in Legion of the Bouncy Castle Java Cryptography APIs related to XMSS/XMSS^MT private key deserialization. It allows for the execution of unexpected code due to externally-controlled input, enabling remote code execution. Exploitation requires a handcrafted malicious private key.

Affected Software

org.bouncycastle:bcprov-jdk15on >1.57, <1.60

Technical Details

The vulnerability stems from insecure deserialization during the loading of XMSS/XMSS^MT private key files. When a private key is deserialized, the application uses externally-controlled input to select classes or code, specifically allowing references to arbitrary classes to be picked up from the classpath. An attacker can craft a malicious private key file that includes references to unexpected or harmful classes. When the application attempts to deserialize this private key, it will instantiate and execute code from these attacker-controlled classes, leading to arbitrary code execution.

What is the Impact of CVE-2018-1000613?

Successful exploitation may allow attackers to execute arbitrary code on the server, gain full control of the affected system, and compromise data confidentiality, integrity, and availability.

What is the Exploitability of CVE-2018-1000613?

Exploitation requires the attacker to provide a handcrafted private key that references malicious classes. The complexity is high, as it requires detailed knowledge of Java deserialization vulnerabilities and the application's classpath. No specific authentication is mentioned or appears to be required for the deserialization process itself, assuming the attacker can inject the malicious private key. This is likely a remote exploitation scenario if an attacker can upload or provide a malicious private key file, or local if they have write access to such files. The primary risk factor is the application's handling of untrusted serialized data without proper validation.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2018-1000613?

Available Upgrade Options

  • org.bouncycastle:bcprov-jdk15on
    • >1.57, <1.60 → Upgrade to 1.60

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CVE-2018-1000613?

Similar Vulnerabilities: CVE-2020-2564 , CVE-2019-10086 , CVE-2017-3506 , CVE-2017-3507 , CVE-2017-3241