CVE-2017-7189
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by...
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fsockopen('127.0.0.1:80', 443) as if the address/port were 127.0.0.1:80:443, which is later truncated to 127.0.0.1:80. This behavior has a security risk if the explicitly provided port number (i.e., 443 in this example) is hardcoded into an application as a security policy, but the hostname argument (i.e., 127.0.0.1:80 in this example) is obtained from untrusted input.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
7.5
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fsockopen('127.0.0.1:80', 443) as if the address/port were 127.0.0.1:80:443, which is later truncated to 127.0.0.1:80. This behavior has a security risk if the explicitly provided port number (i.e., 443 in this example) is hardcoded into an application as a security policy, but the hostname argument (i.e., 127.0.0.1:80 in this example) is obtained from untrusted input.
- Record
CVE-2017-7189- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
CVE List No score
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fsockopen('127.0.0.1:80', 443) as if the address/port were 127.0.0.1:80:443, which is later truncated to 127.0.0.1:80. This behavior has a security risk if the explicitly provided port number (i.e., 443 in this example) is hardcoded into an application as a security policy, but the hostname argument (i.e., 127.0.0.1:80 in this example) is obtained from untrusted input.
- Record
CVE-2017-7189- Updated
- 2026-11-02
EUVDEUVD-2017-16227 No score
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fsockopen('127.0.0.1:80', 443) as if the address/port were 127.0.0.1:80:443, which is later truncated to 127.0.0.1:80. This behavior has a security risk if the explicitly provided port number (i.e., 443 in this example) is hardcoded into an application as a security policy, but the hostname argument (i.e., 127.0.0.1:80 in this example) is obtained from untrusted input.
- Record
EUVD-2017-16227- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-3mh5-9253-628p
7.5
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by...
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fsockopen('127.0.0.1:80', 443) as if the address/port were 127.0.0.1:80:443, which is later truncated to 127.0.0.1:80. This behavior has a security risk if the explicitly provided port number (i.e., 443 in this example) is hardcoded into an application as a security policy, but the hostname argument (i.e., 127.0.0.1:80 in this example) is obtained from untrusted input.
- Record
GHSA-3mh5-9253-628p- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
7.5
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fsockopen('127.0.0.1:80', 443) as if the address/port were 127.0.0.1:80:443, which is later truncated to 127.0.0.1:80. This behavior has a security risk if the explicitly provided port number (i.e., 443 in this example) is hardcoded into an application as a security policy, but the hostname argument (i.e., 127.0.0.1:80 in this example) is obtained from untrusted input.
- Record
CVE-2017-7189- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2017-7189
7.5
main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fsockopen('127.0.0.1:80', 443) as if the address/port were 127.0.0.1:80:443, which is later truncated to 127.0.0.1:80. This behavior has a security risk if the explicitly provided port number (i.e., 443 in this example) is hardcoded into an application as a security policy, but the hostname argument (i.e., 127.0.0.1:80 in this example) is obtained from untrusted input.
- Record
UBUNTU-CVE-2017-7189- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
php5Ubuntu:Pro:14.04:LTS |
All versions, plus listed versions 5.5.3+dfsg-1ubuntu25.5.3+dfsg-1ubuntu35.5.6+dfsg-1ubuntu15.5.6+dfsg-1ubuntu25.5.8+dfsg-2ubuntu1 Show 44 moreShow less5.5.9+dfsg-1ubuntu15.5.9+dfsg-1ubuntu25.5.9+dfsg-1ubuntu35.5.9+dfsg-1ubuntu45.5.9+dfsg-1ubuntu4.15.5.9+dfsg-1ubuntu4.25.5.9+dfsg-1ubuntu4.35.5.9+dfsg-1ubuntu4.45.5.9+dfsg-1ubuntu4.55.5.9+dfsg-1ubuntu4.65.5.9+dfsg-1ubuntu4.75.5.9+dfsg-1ubuntu4.95.5.9+dfsg-1ubuntu4.115.5.9+dfsg-1ubuntu4.125.5.9+dfsg-1ubuntu4.135.5.9+dfsg-1ubuntu4.145.5.9+dfsg-1ubuntu4.165.5.9+dfsg-1ubuntu4.175.5.9+dfsg-1ubuntu4.195.5.9+dfsg-1ubuntu4.205.5.9+dfsg-1ubuntu4.215.5.9+dfsg-1ubuntu4.225.5.9+dfsg-1ubuntu4.235.5.9+dfsg-1ubuntu4.245.5.9+dfsg-1ubuntu4.255.5.9+dfsg-1ubuntu4.265.5.9+dfsg-1ubuntu4.275.5.9+dfsg-1ubuntu4.295.5.9+dfsg-1ubuntu4.29+esm15.5.9+dfsg-1ubuntu4.29+esm25.5.9+dfsg-1ubuntu4.29+esm35.5.9+dfsg-1ubuntu4.29+esm45.5.9+dfsg-1ubuntu4.29+esm55.5.9+dfsg-1ubuntu4.29+esm65.5.9+dfsg-1ubuntu4.29+esm85.5.9+dfsg-1ubuntu4.29+esm105.5.9+dfsg-1ubuntu4.29+esm115.5.9+dfsg-1ubuntu4.29+esm125.5.9+dfsg-1ubuntu4.29+esm135.5.9+dfsg-1ubuntu4.29+esm145.5.9+dfsg-1ubuntu4.29+esm155.5.9+dfsg-1ubuntu4.29+esm165.5.9+dfsg-1ubuntu4.29+esm175.5.9+dfsg-1ubuntu4.29+esm18 |
None known |
php7.0Ubuntu:Pro:16.04:LTS |
All versions, plus listed versions 7.0.1-57.0.1-67.0.2-17.0.2-37.0.2-4 Show 45 moreShow less7.0.2-57.0.3-27.0.3-37.0.3-9ubuntu17.0.4-5ubuntu17.0.4-5ubuntu27.0.4-7ubuntu17.0.4-7ubuntu27.0.4-7ubuntu2.17.0.8-0ubuntu0.16.04.17.0.8-0ubuntu0.16.04.27.0.8-0ubuntu0.16.04.37.0.13-0ubuntu0.16.04.17.0.15-0ubuntu0.16.04.17.0.15-0ubuntu0.16.04.27.0.15-0ubuntu0.16.04.47.0.18-0ubuntu0.16.04.17.0.22-0ubuntu0.16.04.17.0.25-0ubuntu0.16.04.17.0.28-0ubuntu0.16.04.17.0.30-0ubuntu0.16.04.17.0.32-0ubuntu0.16.04.17.0.33-0ubuntu0.16.04.17.0.33-0ubuntu0.16.04.27.0.33-0ubuntu0.16.04.37.0.33-0ubuntu0.16.04.47.0.33-0ubuntu0.16.04.57.0.33-0ubuntu0.16.04.67.0.33-0ubuntu0.16.04.77.0.33-0ubuntu0.16.04.97.0.33-0ubuntu0.16.04.117.0.33-0ubuntu0.16.04.127.0.33-0ubuntu0.16.04.147.0.33-0ubuntu0.16.04.157.0.33-0ubuntu0.16.04.167.0.33-0ubuntu0.16.04.16+esm17.0.33-0ubuntu0.16.04.16+esm27.0.33-0ubuntu0.16.04.16+esm37.0.33-0ubuntu0.16.04.16+esm47.0.33-0ubuntu0.16.04.16+esm57.0.33-0ubuntu0.16.04.16+esm67.0.33-0ubuntu0.16.04.16+esm77.0.33-0ubuntu0.16.04.16+esm87.0.33-0ubuntu0.16.04.16+esm97.0.33-0ubuntu0.16.04.16+esm10 |
None known |
php7.2Ubuntu:Pro:18.04:LTS |
All versions, plus listed versions 7.2.1-1ubuntu27.2.2-1ubuntu17.2.2-1ubuntu27.2.3-1ubuntu17.2.5-0ubuntu0.18.04.1 Show 37 moreShow less7.2.7-0ubuntu0.18.04.17.2.7-0ubuntu0.18.04.27.2.10-0ubuntu0.18.04.17.2.15-0ubuntu0.18.04.17.2.15-0ubuntu0.18.04.27.2.17-0ubuntu0.18.04.17.2.19-0ubuntu0.18.04.17.2.19-0ubuntu0.18.04.27.2.24-0ubuntu0.18.04.17.2.24-0ubuntu0.18.04.27.2.24-0ubuntu0.18.04.37.2.24-0ubuntu0.18.04.47.2.24-0ubuntu0.18.04.67.2.24-0ubuntu0.18.04.77.2.24-0ubuntu0.18.04.87.2.24-0ubuntu0.18.04.97.2.24-0ubuntu0.18.04.107.2.24-0ubuntu0.18.04.117.2.24-0ubuntu0.18.04.127.2.24-0ubuntu0.18.04.137.2.24-0ubuntu0.18.04.157.2.24-0ubuntu0.18.04.167.2.24-0ubuntu0.18.04.177.2.24-0ubuntu0.18.04.17+esm17.2.24-0ubuntu0.18.04.17+esm27.2.24-0ubuntu0.18.04.17+esm37.2.24-0ubuntu0.18.04.17+esm47.2.24-0ubuntu0.18.04.17+esm57.2.24-0ubuntu0.18.04.17+esm67.2.24-0ubuntu0.18.04.17+esm77.2.24-0ubuntu0.18.04.17+esm87.2.24-0ubuntu0.18.04.17+esm97.2.24-0ubuntu0.18.04.17+esm107.2.24-0ubuntu0.18.04.17+esm117.2.24-0ubuntu0.18.04.17+esm127.2.24-0ubuntu0.18.04.17+esm137.2.24-0ubuntu0.18.04.17+esm14 |
None known |
php7.4Ubuntu:Pro:20.04:LTS |
All versions, plus listed versions 7.4.3-4build17.4.3-4build27.4.3-4ubuntu17.4.3-4ubuntu1.17.4.3-4ubuntu2.2 Show 27 moreShow less7.4.3-4ubuntu2.47.4.3-4ubuntu2.57.4.3-4ubuntu2.67.4.3-4ubuntu2.77.4.3-4ubuntu2.87.4.3-4ubuntu2.97.4.3-4ubuntu2.107.4.3-4ubuntu2.117.4.3-4ubuntu2.127.4.3-4ubuntu2.137.4.3-4ubuntu2.157.4.3-4ubuntu2.167.4.3-4ubuntu2.177.4.3-4ubuntu2.187.4.3-4ubuntu2.197.4.3-4ubuntu2.207.4.3-4ubuntu2.227.4.3-4ubuntu2.237.4.3-4ubuntu2.247.4.3-4ubuntu2.267.4.3-4ubuntu2.287.4.3-4ubuntu2.297.4.3-4ubuntu2.29+esm17.4.3-4ubuntu2.29+esm27.4.3-4ubuntu2.29+esm37.4.3-4ubuntu2.29+esm47.4.3-4ubuntu2.29+esm5 |
None known |
php8.1Ubuntu:22.04:LTS |
All versions, plus listed versions 8.1.0~rc4-1ubuntu28.1.0-18.1.2-1ubuntu18.1.2-1ubuntu28.1.2-1ubuntu2.1 Show 24 moreShow less8.1.2-1ubuntu2.28.1.2-1ubuntu2.38.1.2-1ubuntu2.48.1.2-1ubuntu2.58.1.2-1ubuntu2.68.1.2-1ubuntu2.88.1.2-1ubuntu2.98.1.2-1ubuntu2.108.1.2-1ubuntu2.118.1.2-1ubuntu2.138.1.2-1ubuntu2.148.1.2-1ubuntu2.158.1.2-1ubuntu2.178.1.2-1ubuntu2.188.1.2-1ubuntu2.198.1.2-1ubuntu2.208.1.2-1ubuntu2.218.1.2-1ubuntu2.228.1.2-1ubuntu2.238.1.2-1ubuntu2.248.1.2-1ubuntu2.258.1.2-1ubuntu2.268.1.2-1ubuntu2.278.1.2-1ubuntu2.28 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2017-7189 is a high vulnerability (CVSS 7.5) in Php, published July 10, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.43%, the 84th percentile. No source names a fixed version.
References
Left out here: 12 versions. The JSON record has them.