CVE-2025-1220
Hostname Null Character Vulnerability
Publication Date | 2025-07-13 |
---|---|
Severity | Moderate |
Type | XML eXternal Entity injection |
Affected PHP Versions |
|
Fixed Product Versions |
|
CVE Details
The fsockopen()
function and related functions failed to validate NULL
characters within the provided hostname, potentially leading to unexpected behavior during parsing. This flaw allows a network attacker to supply a specially crafted hostname. This issue can result in a denial of service due to parsing errors.
Recommendations
If using fsockopen()
to establish a remote socket connection, either do not use a user-provided $hostname
argument, or validate it ahead of time using filter_var($hostname, FILTER_VALIDATE_DOMAIN)
.
Ideally, we recommend upgrading to a known patched version of PHP.