Skip to content

Use of deprecated pycrypto package

Description

The application is importing the pycrypto package, which has been deprecated due to security vulnerabilities. Consider using the cryptography package instead.

Examples

Insecure Code

python
import Crypto.Cipher

Secure Code

python
from cryptography.fernet import Fernet

Remediation

Replace pycrypto imports with cryptography package imports

Rule Details

FieldValue
IDCODE-0134
CategoryCrypto
SeverityMEDIUM
CWECWE-1104
ConfidenceHIGH
ImpactMEDIUM
LikelihoodMEDIUM
ExploitabilityEASY
Tagsdeprecated package, security vulnerability
OWASPA9:2017-Using Components with Known Vulnerabilities, A02:2021-Cryptographic Failures