Description
The strip_tags function in PHP 4.x up to 4.3.7, and 5.x up to 5.0.0RC3, does not filter null (\0) characters within tag names when restricting input to allowed tags, which allows dangerous tags to be processed by web browsers such as Internet Explorer and Safari, which ignore null characters and facilitate the exploitation of cross-site scripting (XSS) vulnerabilities.
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 ↗Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 3 | php +6 | 4.3.2-11.1.ent | RHSA-2004:392 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PHP 4.x/5.0 - 'Strip_Tags()' Function Bypass EDB-24280 · remote · Jul 14, 2004 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- RHSA-2004:392 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- DSA-531 php4 - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-669-1 php3 - several Debian Security (DSA / DLA) · Mar 9, 2026
References
- CLA-2004:847 vendor-advisory
- 20040714 TSSA-2004-013 - php mailing-list
- DSA-669 vendor-advisory
- oval:org.mitre.oval:def:10619 vdb-entry signature
- RHSA-2004:395 vendor-advisory
- RHSA-2004:405 vendor-advisory
- RHSA-2004:392 vendor-advisory
- DSA-531 vendor-advisory
- SUSE-SA:2004:021 vendor-advisory
- MDKSA-2004:068 vendor-advisory
- php-strip-tag-bypass(16692) vdb-entry
- RHSA-2005:816 vendor-advisory
- SSRT4777 vendor-advisory
- 20040722 [OpenPKG-SA-2004.034] OpenPKG Security Advisory (php) mailing-list
- 10724 vdb-entry
- 20040713 Advisory 11/2004: PHP memory_limit remote vulnerability mailing-list
- GLSA-200407-13 vendor-advisory
- 20040714 Advisory 12/2004: PHP strip_tags() bypass vulnerability mailing-list