PyCrypto is obsolete and vulnerable
End of life as of 2022-01-27. Replacement: pycryptodome or cryptography. Source: Archived PyCrypto repository warning.
Check a version:
evergreen check pkg:pypi/pycrypto
The archived project warns that PyCrypto 2.x is unmaintained, obsolete, and contains security vulnerabilities.
Look up another package or runtime · <form action="../lookup.html" method="get" role="search"> </form>
| Status | End of life |
| Severity | critical |
| Ecosystem | python |
| Component | pkg:pypi/pycrypto |
| Affected versions | vers:pypi/* |
| Date from the source | 2022-01-27 |
| Replacement | pycryptodome or cryptography |
| Evidence last seen | 2026-10-14 |
| Reviewed | 2026-10-14 by arminazimi |
| Review due | 2027-10-14 (365 days after the last review) |
| Rule ID | python.package.pycrypto.obsolete |
Sources
- Archived PyCrypto repository warning (accessed 2026-10-16)
Migration
Constraints
- Treat this as a security-sensitive migration: preserve algorithms, modes, key sizes, padding, nonces or IVs, authentication tags, and serialized ciphertext formats.
- Do not silently change cryptographic primitives or defaults without explicit compatibility and security review.
Steps
- Choose the maintained library. Select pycryptodome for a closer Crypto namespace migration or cryptography for a higher-level maintained interface.
- Migrate cryptographic usages. Update every reported import and operation, making keys, modes, padding, nonces, tags, and encoding explicit.
- Replace the dependency. Remove pycrypto, add the selected maintained package, and regenerate the environment lock data.
- Verify cryptographic test vectors. Confirm known plaintext/ciphertext vectors and backward compatibility with persisted encrypted data.
Verification
python -m pytest: Run cryptographic vectors and repository tests.python -m pip check: Check installed dependency compatibility.
Detected by
The python detector. See Detectors and Compatibility.
Related
Same ecosystem
- The aifc module was removed in Python 3.13
- The asynchat module was removed in Python 3.12
- The asyncore module was removed in Python 3.12
- The audioop module was removed in Python 3.13
- The cgi module was removed in Python 3.13
- The cgitb module was removed in Python 3.13
- The chunk module was removed in Python 3.13
- The crypt module was removed in Python 3.13
Data
This page is generated from registry/python.json, rule python.package.pycrypto.obsolete, in the ebb.registry.v2 format (how rules are written). A CLE (ECMA-428) export is not published yet. The same facts are embedded in this page as schema.org structured data.
Last updated