CVE-2020-7226
Memory Allocation vulnerability in cryptacular (Maven)

Memory Allocation No known exploit Fixable By Resolved Security

What is CVE-2020-7226 About?

Cryptacular before 1.2.4 suffers from a denial-of-service vulnerability due to excessive memory allocation during decode operations. This flaw, particularly in the CiphertextHeader.java component, allows attackers to trigger resource exhaustion with untrusted input in encoded data. Exploitation is relatively easy, merely requiring the submission of malformed encrypted data.

Affected Software

  • org.cryptacular:cryptacular
    • <1.1.4
    • >1.2.0, <1.2.4

Technical Details

The vulnerability resides in the CiphertextHeader.java component of Cryptacular, prior to version 1.2.4, affecting applications like Apereo CAS. During the decode operation of encrypted data, the nonce array length is derived from untrusted input contained within the header of the encoded data. An attacker can manipulate this untrusted input to specify an excessively large nonce array length. When the application attempts to allocate memory for this large array using new byte[], it consumes a significant amount of system memory. Repeated requests with such malformed headers can lead to excessive memory allocation, ultimately causing a denial of service by exhausting available memory resources on the server.

What is the Impact of CVE-2020-7226?

Successful exploitation may allow attackers to exhaust system resources, leading to a denial of service and disrupting the availability of the affected application.

What is the Exploitability of CVE-2020-7226?

Exploitation of this vulnerability is of low complexity. An attacker would send specially crafted encoded data with a manipulated header containing an excessive nonce array length to an application using the vulnerable Cryptacular library. No authentication is typically required, as this vulnerability targets the decoding of data, which might occur prior to or independently of authentication. This is a remote exploitation scenario. There are no specific user-privilege requirements for the attacker. The primary risk factor that increases exploitation likelihood is any publicly exposed endpoint that processes encrypted data using the vulnerable Cryptacular library, allowing untrusted input to reach the decoding function.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2020-7226?

A Fix by Resolved Security Exists!
See how we help you strengthen security with automated backported fixes for your libraries.

About the Fix from Resolved Security

The patch adds strict upper bounds for nonce and key name lengths, throwing exceptions if these are exceeded, which prevents oversized fields when decoding or encoding cipher headers. This fixes CVE-2020-7226 by mitigating the risk of buffer overflows and uncontrolled memory allocation caused by attacker-supplied, excessively large header values in encrypted data, thus eliminating a vector for denial-of-service and potential exploitation.

Available Upgrade Options

  • org.cryptacular:cryptacular
    • <1.1.4 → Upgrade to 1.1.4
  • org.cryptacular:cryptacular
    • >1.2.0, <1.2.4 → Upgrade to 1.2.4

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-2020-7226?

Similar Vulnerabilities: CVE-2018-1000632 , CVE-2022-23533 , CVE-2021-3807 , CVE-2022-28281 , CVE-2021-42340