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…
Noroxi assessment
Priority: Monitor (action score 21/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 2.9% (FIRST EPSS); higher than 87.5% of all records.
- No special conditions are required; it is repeatable.
- Fixed version: php4 (Debian:4.0) 6:4.4.4-8+etch6; php5 (Debian:4.0) 5.2.0-8+etch9; php5 (Debian:5.0) 5.2.3-1+lenny1.
Low priority for now. Upgrade to php4 (Debian:4.0) 6:4.4.4-8+etch6; php5 (Debian:4.0) 5.2.0-8+etch9; php5 (Debian:5.0) 5.2.3-1+lenny1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Sep 4, 2007
- Updated
- Jun 16, 2026
- EPSS
- 2.9% · 87th percentile
- CWE
- CWE-20
Report tools
Action score
21
Low priority for now.
- CVSS
- 20 / 40 · 5.0 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.9%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| php | php | cpe:2.3:a:php:php |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| canonical | ubuntu linux | cpe:2.3:o:canonical:ubuntu_linux |
Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php php4.0.0 and later · before 4.4.8
- php php5.0.0 and later · before 5.2.4
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:4.0 | php4 | before 6:4.4.4-8+etch6 | 6:4.4.4-8+etch6 |
| Debian:4.0 | php5 | before 5.2.0-8+etch9 | 5.2.0-8+etch9 |
| Debian:5.0 | php5 | before 5.2.3-1+lenny1 | 5.2.3-1+lenny1 |
| Red Hat:enterprise_linux:3::as | php | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:3::as | php-debuginfo | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:3::as | php-devel | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:3::as | php-imap | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:3::as | php-ldap | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:3::as | php-mysql | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:3::as | php-odbc | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:3::as | php-pgsql | before 0:4.3.2-43.ent | 0:4.3.2-43.ent |
| Red Hat:enterprise_linux:4::as | php | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-debuginfo | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-devel | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-domxml | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-gd | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-imap | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-ldap | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-mbstring | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-mysql | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-ncurses | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-odbc | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-pear | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
| Red Hat:enterprise_linux:4::as | php-pgsql | before 0:4.3.9-3.22.9 | 0:4.3.9-3.22.9 |
+62
Same product
php: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-4577Argument Injection in PHP-CGIKEV99Now
- CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV99Now
- CVE-2012-1823sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle…KEV99Now
Published before and after this one in the same product
- ← EarlierCVE-2007-3996Sep 4, 2007 · Multiple integer overflows in libgd in PHP before 5.2.4 allow remote attackers to cause a denial of service (application crash) and…28Monitor
- ← EarlierCVE-2007-3997Sep 4, 2007 · The (1) MySQL and (2) MySQLi extensions in PHP 4 before 4.4.8, and PHP 5 before 5.2.4, allow remote attackers to bypass safe_mode and…34Monitor
- Later →CVE-2007-4652Sep 4, 2007 · The session extension in PHP before 5.2.4 might allow local users to bypass open_basedir restrictions via a session file that is a symlink.17Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:php4 | 6:4.4.4-8+etch6 · Debian:4.0 | Package registry (OSV) |
| debian:php5 | 5.2.0-8+etch9 · Debian:4.0 | Package registry (OSV) |
| red hat:php | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
| red hat:php-debuginfo | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
| red hat:php-devel | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
| red hat:php-domxml | 0:4.3.9-3.22.9 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:php-gd | 0:4.3.9-3.22.9 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:php-imap | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
| red hat:php-ldap | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
| red hat:php-mbstring | 0:4.3.9-3.22.9 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:php-mysql | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
| red hat:php-ncurses | 0:4.3.9-3.22.9 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:php-odbc | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
| red hat:php-pgsql | 0:4.3.2-43.ent · Red Hat:enterprise_linux:3::as | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- P · the service can be disrupted
- Attack complexity
- Low
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- P
Weakness class (CWE)
CWE-20 · Improper Input ValidationCVSS vector
AV:N/AC:L/Au:N/C:N/I:N/A:P
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Buffer Overflow via Environment VariablesCAPEC-10likelihood: High · High
- Server Side Include (SSI) InjectionCAPEC-101likelihood: High · High
- Cross Zone ScriptingCAPEC-104likelihood: Medium · High
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Object Relational Mapping InjectionCAPEC-109likelihood: Low · High
- SQL Injection through SOAP Parameter TamperingCAPEC-110likelihood: High · Very High
- Double EncodingCAPEC-120likelihood: Low · Medium
- Subverting Environment Variable ValuesCAPEC-13likelihood: High · Very High
ATT&CK techniques
- Obfuscated Files or InformationT1027
- Masquerading: Invalid Code SignatureT1036.001
- Steal Web Session CookieT1539
- Subvert Trust Controls: Code SigningT1553.002
- Impair Defenses:Impair Command History LoggingT1562.003
- Hijack Execution Flow:Dynamic Linker HijackingT1574.006
- Hijack Execution Flow:Path Interception by PATH Environment VariableT1574.007
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (19 more)Show less
- rhn.redhat.com/errata/RHSA-2007-0889.html
- secunia.com/advisories/26642
- secunia.com/advisories/26822
- secunia.com/advisories/26838
- secunia.com/advisories/26871
- secunia.com/advisories/26895
- secunia.com/advisories/26930
- secunia.com/advisories/26967
- secunia.com/advisories/27102
- secunia.com/advisories/27377
- secunia.com/advisories/27545
- secunia.com/advisories/27864
- secunia.com/advisories/28249
- secunia.com/advisories/28658
- secunia.com/advisories/30288
- secweb.se/en/advisories/php-wordwrap-vulnerability/
- support.avaya.com/elmodocs2/security/ASA-2007-449.htm
- www.debian.org/security/2008/dsa-1444
- www.debian.org/security/2008/dsa-1578
Vendor advisories and official records. Exploit/PoC links are deliberately left out.