VAITP Dataset

← Back to the dataset

CVE-2020-8897

Weak robustness vulnerability in AWS Encryption SDKs (Java, Python, C, JavaScript) < 2.0.0, due to non-committing property of AEAD ciphers

  • CVSS 8.1
  • CWE-327
  • Cryptographic
  • Remote

A weak robustness vulnerability exists in the AWS Encryption SDKs for Java, Python, C and Javalcript prior to versions 2.0.0. Due to the non-committing property of AES-GCM (and other AEAD ciphers such as AES-GCM-SIV or (X)ChaCha20Poly1305) used by the SDKs to encrypt messages, an attacker can craft a unique cyphertext which will decrypt to multiple different results, and becomes especially relevant in a multi-recipient setting. We recommend users update their SDK to 2.0.0 or later.

CVSS base score
8.1
Published
2020-11-16
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Algorithm
Code defect classification
Incorrect Algorithm
Category
Cryptographic
Subcategory
Cryptographic Implementation Error
Accessibility scope
Remote
Impact
Data Theft
Fixed by upgrading
Yes

Solution

Update AWS Encryption SDKs to version 2.0.0 or later.

Vulnerable code sample

from aws_encryption_sdk import encrypt, decrypt
from aws_encryption_sdk.key_providers.kms import KMSMasterKeyProvider

kms_key_provider = KMSMasterKeyProvider(key_ids=['your-kms-key-id'])

def encrypt(plaintext):
    ciphertext, encryptor_header = encrypt(
        source=plaintext,
        key_provider=kms_key_provider
    )
    return ciphertext

Patched code sample

from aws_encryption_sdk import encrypt, decrypt
from aws_encryption_sdk.key_providers.kms import KMSMasterKeyProvider

kms_key_provider = KMSMasterKeyProvider(key_ids=['your-kms-key-id'])

def encrypt_data(plaintext, encryption_context=None):
    ciphertext, encryptor_header = encrypt(
        source=plaintext,
        key_provider=kms_key_provider,
        encryption_context=encryption_context
    )
    return ciphertext

Cite this entry

@misc{vaitp:cve20208897,
  title        = {{Weak robustness vulnerability in AWS Encryption SDKs (Java, Python, C, JavaScript) < 2.0.0, due to non-committing property of AEAD ciphers}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2020},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2020-8897},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2020-8897/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::