Description
Heap-based buffer overflow in the ALGnew function in block_templace.c in Python Cryptography Toolkit (aka pycrypto) allows remote attackers to execute arbitrary code as demonstrated by a crafted iv parameter to cryptmsg.py.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 7 | python-crypto | 2.6-4+deb7u4 | DLA-773-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | python-crypto | 2.6.1-6ubuntu0.16.04.1 | USN-3199-2, USN-3199-1 |
| Ubuntu 14.04 LTS | python-crypto | 2.6.1-4ubuntu0.1 | USN-3199-2, USN-3199-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 | python-paramiko | 1.15.2-2.6.1 | SUSE-SU-2017:2350-1 |
| SLES 12 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SLES 11 SP4 | python-pycrypto | 2.6.1-5.1 | SUSE-SU-2017:1744-1 |
| SLES 11 SP3 | python-pycrypto | 2.6.1-5.1 | SUSE-SU-2017:1744-1 |
Show 10 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE OpenStack Cloud 7 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE OpenStack Cloud 6 | python-paramiko | 1.15.2-2.3.1 | SUSE-SU-2017:2350-1 |
| SUSE OpenStack Cloud 6 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Manager Server 3.1 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Manager Server 3.0 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Manager Proxy 3.1 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Manager Proxy 3.0 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Manager Client Tools 12 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Linux Enterprise Point of Sale 12 SP2 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Enterprise Storage 4 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Enterprise Storage 3 | python-paramiko | 1.15.2-2.3.1 | SUSE-SU-2017:2350-1 |
| SUSE Enterprise Storage 3 | python-pycrypto | 2.6.1-10.3.1 | SUSE-SU-2017:2350-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | pycrypto | <= 2.6.1 | — | GHSA-cq27-v7xp-c356 |
| PyPI | pycrypto | all versions | — | PYSEC-2017-94 |
Advisories 6
- DLA-773-1 python-crypto - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-3199-1 Python Crypto vulnerability Ubuntu Security Notices (USN) · Feb 10, 2026
- USN-3199-2 Python Crypto regression Ubuntu Security Notices (USN) · Feb 10, 2026
- SUSE-SU-2017:1744-1 Security update for python-pycrypto SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:2350-1 Security update for python-pycrypto SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2024-1441 Python-crypto: Schwachstelle ermöglicht Ausführen von beliebigem Programmcode BSI CERT-Bund (WID) · Jun 24, 2024
References
- https://bugzilla.redhat.com/show_bug.cgi?id=1409754
- https://pony7.fr/ctf:public:32c3:cryptmsg
- [oss-security] 20161227 Re: Buffer overflow in pycrypto mailing-list
- FEDORA-2017-7c569d396b vendor-advisory
- https://github.com/dlitz/pycrypto/issues/176
- 95122 vdb-entry
- FEDORA-2017-08207fe48b vendor-advisory
- GLSA-201702-14 vendor-advisory
- https://github.com/dlitz/pycrypto/commit/8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4