What’s Vulnerable › Vulnerabilities
CVE-2025-1220: Null byte termination in hostnames
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2025-07-13 · updated 2026-06-17
- Weakness: CWE-918
Description
In PHP versions:8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, 8.4.* before 8.4.10 some functions like fsockopen() lack validation that the hostname supplied does not contain null characters. This may lead to other functions like parse_url() treat the hostname in different way, thus opening way to security problems if the user code implements access checks before access using such functions.
Affected products
- PHP: from 8.1.0 before 8.1.33; from 8.2.0 before 8.2.29; from 8.3.0 before 8.3.23; from 8.4.0 before 8.4.10 — fixed in 8.1.33, 8.2.29, 8.3.23, 8.4.10
How to fix
Upgrade to a fixed version: PHP 8.1.33, 8.2.29, 8.3.23, 8.4.10. Check the vendor advisory for mitigations.
References
- https://github.com/php/php-src/security/advisories/GHSA-3cr5-j632-f35r
- http://www.openwall.com/lists/oss-security/2025/07/11/4
- https://lists.debian.org/debian-lts-announce/2025/07/msg00017.html
- https://github.com/php/php-src/security/advisories/GHSA-3cr5-j632-f35r
Get alerted when CVE-2025-1220 or the next vulnerability affects your stack