Description
The dba_replace function in PHP 5.2.6 and 4.x allows context-dependent attackers to cause a denial of service (file truncation) via a key with the NULL byte. NOTE: this might only be a vulnerability in limited circumstances in which the attacker can modify or add database entries but does not have permissions to truncate the file.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 5.0 | php5 | 5.2.6.dfsg.1-1+lenny2 | DTSA-188-1 |
Advisories 1
- DTSA-188-1 php5 - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- 20081206 Re: SecurityReason : PHP 5.2.6 dba_replace() destroying file mailing-list
- php-dbareplace-file-corruption(47316) vdb-entry
- 52206 vdb-entry
- 20081127 PHP 5.2.6 dba_replace() destroying file third-party-advisory
- 20081127 SecurityReason : PHP 5.2.6 dba_replace() destroying file mailing-list
- http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1313&r2=1.2027.2.547.2.1314&
- 20081206 Re: SecurityReason : PHP 5.2.6 dba_replace() destroying file mailing-list