8.1.33
8.2.29
8.3.23
8.4.10
CVE-2025-1220 is een kwetsbaarheid in PHP die betrekking heeft op de manier waarop bepaalde functies, zoals fsockopen(), hostnamen verwerken. Door het ontbreken van validatie op null-bytes in de hostname, kan parse_url() onverwacht gedrag vertonen, wat mogelijk kan leiden tot beveiligingsproblemen. Deze kwetsbaarheid treft PHP-versies 8.1.0 tot 8.4.10 en is verholpen in PHP 8.4.10.
Deze kwetsbaarheid stelt een aanvaller in staat om, door een speciaal geconstrueerde hostname met null-bytes te injecteren, parse_url() te misleiden. Dit kan leiden tot onverwachte resultaten bij het parsen van URL's, wat vervolgens kan worden misbruikt om toegang te krijgen tot gevoelige informatie of om andere ongewenste acties uit te voeren. De impact is afhankelijk van hoe de applicatie de URL's gebruikt en valideert. Een succesvolle exploit kan leiden tot data-exfiltratie of zelfs code-uitvoering, afhankelijk van de context.
Er zijn momenteel geen publieke proof-of-concept exploits bekend voor CVE-2025-1220. De kwetsbaarheid is gepubliceerd op 2025-07-13 en is momenteel niet opgenomen in de CISA KEV catalogus. De CVSS score is LOW, wat suggereert dat de exploitatie complexiteit relatief hoog is.
Applications built using PHP that rely on user-supplied hostnames for access control or resource identification are at risk. This includes web applications that connect to external services or databases using dynamically constructed URLs. Legacy PHP applications with outdated security practices are particularly vulnerable.
• php: Examine PHP application code for instances of fsockopen() and parse_url() where hostnames are used without proper validation. Look for patterns where user-supplied input is directly passed to these functions.
// Example of vulnerable code
$hostname = $_GET['hostname'];
$url = parse_url('http://' . $hostname);
$ip = $url['host'];• linux / server: Monitor PHP error logs (typically in /var/log/php_errors.log) for errors related to URL parsing or hostname resolution. Use journalctl -u php-fpm to filter for relevant errors.
• generic web: Use curl to test endpoints that accept hostnames as parameters. Attempt to inject null characters into the hostname and observe the response. curl -H "Host: example.com%00" http://your-application/
disclosure
Exploit Status
EPSS
0.04% (11% percentiel)
CISA SSVC
CVSS-vector
De primaire mitigatie is het upgraden naar PHP versie 8.4.10 of hoger, waarin de kwetsbaarheid is verholpen. Indien een upgrade niet direct mogelijk is, kan een tijdelijke workaround bestaan uit het implementeren van strenge validatie van hostnamen in de applicatiecode, voorafgaand aan het gebruik van functies zoals fsockopen() en parse_url(). Controleer de hostname op null-bytes en andere ongeldige karakters. Daarnaast is het raadzaam om de configuratie van de webserver te controleren op onnodige permissies.
Werk PHP bij naar de laatste beschikbare versie. Zorg ervoor dat u bijwerkt naar versies 8.1.33, 8.2.29, 8.3.23 of 8.4.10 of hoger, afhankelijk van uw PHP-branch. Dit zal de null byte terminatie kwetsbaarheid in de getroffen functies verhelpen.
Kwetsbaarheidsanalyses en kritieke waarschuwingen direct in uw inbox.
CVE-2025-1220 is a vulnerability in PHP 8.1.0-8.4.10 where inadequate hostname validation in functions like fsockopen() can lead to bypasses of access controls when using parse_url().
You are affected if you are running PHP versions 8.1.0 through 8.1.32, 8.2.0 through 8.2.28, 8.3.0 through 8.3.22, or 8.4.0 through 8.4.9.
Upgrade to PHP 8.4.10 or later. If upgrading is not possible, implement stricter input validation to sanitize hostnames before using fsockopen() and parse_url().
There is currently no indication of active exploitation campaigns targeting CVE-2025-1220.
Refer to the official PHP security advisory for details: [https://security.php.net/advisory/CVE-2025-1220](https://security.php.net/advisory/CVE-2025-1220)
Upload je dependency-bestand en kom direct te weten of deze en andere CVEs jou raken.