CVE-2013-7459
Buffer Overflow in pycrypto
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2013-7459- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-119
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2013-7459- Updated
- 2026-11-02
EUVDEUVD-2017-0102 No score
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.
- Record
EUVD-2017-0102- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-cq27-v7xp-c356
9.3
Buffer Overflow in pycrypto
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.
- Record
GHSA-cq27-v7xp-c356- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
OSVGHSA-cq27-v7xp-c356
9.3
Buffer Overflow in pycrypto
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.
- Record
GHSA-cq27-v7xp-c356- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2013-7459
9.8
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.
- Record
UBUNTU-CVE-2013-7459- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 6 moreShow less
OSVMGASA-2017-0032 No score
Updated python-pycrypto packages fix security vulnerabilities
This is a security fix for a possible Buffer overflow. AES.new with invalid parameter crashes python. The IV parameter is currently ignored when initializing a cipher in ECB or CTR mode. There was a bug in pycrypto which could be exploited to get a shell.
- Record
MGASA-2017-0032- Updated
- 2026-11-02
OSVPYSEC-2017-94 No score
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.
- Record
PYSEC-2017-94- Updated
- 2026-11-02
OSVSUSE-SU-2017:1744-1 No score
Security update for python-pycrypto
This update for python-pycrypto fixes the following issues:
- CVE-2013-7459: Fixed a potential heap buffer overflow in ALGnew (bsc#1017420).
- Record
SUSE-SU-2017:1744-1- Updated
- 2026-11-02
OSVSUSE-SU-2017:2350-1 No score
Security update for python-pycrypto
This update for python-pycrypto fixes the following issues:
- CVE-2013-7459: Fixed a potential heap buffer overflow in ALGnew (bsc#1017420).
python-paramiko was adjusted to work together with this python-pycrypto change. (bsc#1047666)
- Record
SUSE-SU-2017:2350-1- Updated
- 2026-11-02
OSVUSN-3199-1 No score
Python Crypto vulnerability
It was discovered that the ALGnew function in block_templace.c in the Python Cryptography Toolkit contained a heap-based buffer overflow vulnerability. A remote attacker could use this flaw to execute arbitrary code by using a crafted initialization vector parameter.
- Record
USN-3199-1- Updated
- 2026-11-02
OSVUSN-3199-2 No score
Python Crypto regression
USN-3199-1 fixed a vulnerability in the Python Cryptography Toolkit. Unfortunately, various programs depended on the original behavior of the Python Cryptography Toolkit which was altered when fixing the vulnerability. This update retains the fix for the vulnerability but issues a warning rather than throwing an exception. Code which produces this warning should be updated because future versions of the Python Cryptography Toolkit re-introduce the exception.
We apologize for the inconvenience.
Original advisory details:
It was discovered that the ALGnew function in block_template.c in the Python Cryptography Toolkit contained a heap-based buffer overflow vulnerability. A remote attacker could use this flaw to execute arbitrary code by using a crafted initialization vector parameter.
- Record
USN-3199-2- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pycryptoPyPI |
through 2.6.1 | None known |
python-cryptoDebian:7 |
before 2.6-4+deb7u4, plus listed versions 2.6-42.6-4+deb7u22.6-4+deb7u3 |
2.6-4+deb7u4 |
pycryptoPyPI |
through 2.6.1, plus listed versions 1.9a21.9a51.9a62.02.0.1 Show 7 moreShow less2.1.02.22.32.42.4.12.52.6 |
None known |
python-pycryptoMageia:5 |
before 2.6.1-6.1.mga5 | 2.6.1-6.1.mga5 |
pycryptoPyPI |
All versions, plus listed versions 1.9a21.9a51.9a62.02.0.1 Show 8 moreShow less2.1.02.22.32.42.4.12.52.62.6.1 |
None known |
python-pycryptoSUSE:Linux Enterprise Server 11 SP3-CLIENT-TOOLS |
before 2.6.1-5.1 | 2.6.1-5.1 |
python-pycryptoSUSE:Linux Enterprise Server 11 SP4-CLIENT-TOOLS |
before 2.6.1-5.1 | 2.6.1-5.1 |
python-paramikoSUSE:OpenStack Cloud 6 |
before 1.15.2-2.3.1 | 1.15.2-2.3.1 |
python-pycryptoSUSE:OpenStack Cloud 6 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:OpenStack Cloud 7 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
Show 17 moreShow less
| Package | Affected | Fixed |
|---|---|---|
python-pycryptoSUSE:Manager Client Tools 12 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Linux Enterprise Module for Advanced Systems Management 12 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-paramikoSUSE:Linux Enterprise Module for Public Cloud 12 |
before 1.15.2-2.6.1 | 1.15.2-2.6.1 |
python-pycryptoSUSE:Linux Enterprise Module for Public Cloud 12 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Linux Enterprise Module for Web and Scripting 12 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Linux Enterprise Point of Sale 12 SP2 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Manager Proxy 3.0 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Manager Proxy 3.1 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Manager Server 3.0 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Manager Server 3.1 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-paramikoSUSE:Enterprise Storage 3 |
before 1.15.2-2.3.1 | 1.15.2-2.3.1 |
python-pycryptoSUSE:Enterprise Storage 3 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-pycryptoSUSE:Enterprise Storage 4 |
before 2.6.1-10.3.1 | 2.6.1-10.3.1 |
python-cryptoUbuntu:14.04:LTS |
before 2.6.1-4ubuntu0.1, plus listed versions 2.6-52.6.1-22.6.1-2build12.6.1-32.6.1-42.6.1-4build1 |
2.6.1-4ubuntu0.1 |
python-cryptoUbuntu:16.04:LTS |
before 2.6.1-6ubuntu0.16.04.1, plus listed versions 2.6.1-5build12.6.1-62.6.1-6build1 |
2.6.1-6ubuntu0.16.04.1 |
python-cryptoUbuntu:14.04:LTS |
before 2.6.1-4ubuntu0.2, plus listed versions 2.6-52.6.1-22.6.1-2build12.6.1-32.6.1-42.6.1-4build12.6.1-4ubuntu0.1 |
2.6.1-4ubuntu0.2 |
python-cryptoUbuntu:16.04:LTS |
before 2.6.1-6ubuntu0.16.04.2, plus listed versions 2.6.1-5build12.6.1-62.6.1-6build12.6.1-6ubuntu0.16.04.1 |
2.6.1-6ubuntu0.16.04.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2013-7459 is a critical vulnerability (CVSS 9.8) in Dlitz Pycrypto, published January 1, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 9.58%, the 95th percentile. Fixed in python-crypto 2.6-4+deb7u4.
References
bugzilla.redhat.com/show_bug.cgi?id=1409754
pony7.fr/ctf:public:32c3:cryptmsg
openwall.com/lists/oss-security/2016/12/27/8
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RJ37R2YLX56YZABFNAOWV4VTHTGYREAE
github.com/dlitz/pycrypto/issues/176
securityfocus.com/bid/95122
Show 22 moreShow less
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C6BWNADPLKDBBQBUT3P75W7HAJCE7M3B
security.gentoo.org/glsa/201702-14
github.com/dlitz/pycrypto/commit/8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4
nvd.nist.gov/vuln/detail/CVE-2013-7459
github.com/advisories/GHSA-cq27-v7xp-c356
github.com/pypa/advisory-database/tree/main/vulns/pycrypto/PYSEC-2017-94.yaml
lists.fedoraproject.org/archives/list/[email protected]/message/C6BWNADPLKDBBQBUT3P75W7HAJCE7M3B
lists.fedoraproject.org/archives/list/[email protected]/message/RJ37R2YLX56YZABFNAOWV4VTHTGYREAE
github.com/dlitz/pycrypto
advisories.mageia.org/MGASA-2017-0032.html
bugs.mageia.org/show_bug.cgi?id=20031
marc.info?l=oss-security&m=148280482630855&w=2
suse.com/support/update/announcement/2017/suse-su-20171744-1
bugzilla.suse.com/1017420
suse.com/security/cve/CVE-2013-7459
suse.com/support/update/announcement/2017/suse-su-20172350-1
bugzilla.suse.com/1047666
ubuntu.com/security/CVE-2013-7459
ubuntu.com/security/notices/USN-3199-2
ubuntu.com/security/notices/USN-3199-1
ubuntu.com/security/notices/USN-3199-3
cve.org/CVERecord?id=CVE-2013-7459