CVE-2023-52323
Verification flaw in ACA-Py 0.7.0 to 0.10.4 allows malicious replay of W3C Format Verifiable Credentials with JSON-LD Linked Data Proofs (LDPs)
- CVSS 5.9
- CWE-203 Observable Discrepancy
- Cryptographic
- Remote
PyCryptodome and pycryptodomex before 3.19.1 allow side-channel leakage for OAEP decryption, exploitable for a Manger attack.
- CVSS base score
- 5.9
- Published
- 2024-01-05
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Timing Issues
- Category
- Cryptographic
- Subcategory
- Cryptographic Implementation Error
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Fixed by upgrading
- Yes
Solution
Upgrade PyCryptodome or pycryptodomex to version 3.19.1 or later
Vulnerable code sample
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_OAEP
from Crypto.Random import get_random_bytes
# Generate RSA keys
private_key = RSA.generate(2048)
public_key = private_key.publickey()
# Encrypt a message
message = b'This is a secret message.'
cipher = PKCS1_OAEP.new(public_key)
ciphertext = cipher.encrypt(message)
# Decrypt the message (vulnerable version)
cipher = PKCS1_OAEP.new(private_key)
plaintext = cipher.decrypt(ciphertext)
print(plaintext)Patched code sample
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_OAEP
from Crypto.Random import get_random_bytes
# Generate RSA keys
private_key = RSA.generate(2048)
public_key = private_key.publickey()
# Encrypt a message
message = b'This is a secret message.'
cipher = PKCS1_OAEP.new(public_key)
ciphertext = cipher.encrypt(message)
# Decrypt the message (fixed version)
cipher = PKCS1_OAEP.new(private_key)
plaintext = cipher.decrypt(ciphertext)
print(plaintext)Cite this entry
@misc{vaitp:cve202352323,
title = {{Verification flaw in ACA-Py 0.7.0 to 0.10.4 allows malicious replay of W3C Format Verifiable Credentials with JSON-LD Linked Data Proofs (LDPs)}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2023-52323},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2023-52323/}}
}
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 ::
