Description
PHP through 7.1.11 enables potential SSRF in applications that accept an fsockopen or pfsockopen hostname argument with an expectation that the port number is constrained. Because a :port syntax is recognized, fsockopen will use the port number that is specified in the hostname argument, instead of the port number in the second argument of the function.
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 7 | php5 | 5.4.45-0+deb7u8 | DLA-875-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | php7.0 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | php5 | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 11 SP4 | php53 | 5.3.17-108.1 | SUSE-SU-2017:1709-1, SUSE-SU-2017:1585-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 11 SP4 | php53 | 5.3.17-108.1 | SUSE-SU-2017:1709-1, SUSE-SU-2017:1585-1 |
Advisories 4
- DLA-875-1 php5 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2017:1709-1 Security update for php53 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:1585-1 Security update for php53 SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2023-2719 PHP: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 16, 2025
References
- 97178 vdb-entry
- 1038158 vdb-entry
- https://bugs.php.net/bug.php?id=75505
- https://github.com/php/php-src/commit/bab0b99f376dac9170ac81382a5ed526938d595a
- https://security.netapp.com/advisory/ntap-20180112-0001/
- https://www.sec-consult.com/fxdata/seccons/prod/temedia/advisories_txt/20170403-0_PHP_Misbehavior_of_fsockopen_function_v10.txt
- https://bugs.php.net/bug.php?id=74216