Back to CVE catalog
CVE-2017-7189

Misparsing of fsockopen calls in PHP

Multiple products

At a glance

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.

Source description · CVE List / CNA

System impact

Attack complexityLow
ConfidentialityHigh
IntegrityNone
AvailabilityNone

CVSS summary v3.0

7.5High
Published:
Updated:
EPSS:
2.425%
Exploited in attacks:
Not confirmed
Ransomware campaigns:
Not confirmed
Attack vector:
Network

Affected software

Vendor, product and affected version ranges.

Vendor, product and affected versions
Vendor:Red HatRed Hat Enterprise Linux 5Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux 6Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux 7Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux 8Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Software CollectionsAffected versions:Source does not specify a version range
Vendor:phpphpAffected versions:
≥ 7.0.0, < 7.0.16Show full version range for php
  • CPE applicability can depend on other products or environments. Consult the full source configuration.

1–6 of 6 · Page 1 of 1

CVSS scores and metrics4
[email protected] · NVD (Primary)Primary7.5 / 10HighCVSS 3.0Details
Attack complexity
Low
Confidentiality
High
Integrity
None
Availability
None
Attack vector
Network
Privileges required
Not required
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVE-2017-7189 · OSV (source-vector)7.5 / 10HighCVSS 3.0Details
Attack complexity
Low
Confidentiality
High
Integrity
None
Availability
None
Attack vector
Network
Privileges required
Not required
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Red Hat · Red Hat VEX (adp)5.9 / 10MediumCVSS 3.0Details
Attack complexity
High
Confidentiality
High
Integrity
Low
Availability
None
Attack vector
Network
Privileges required
Not required
User interaction
Required
Scope
Unchanged

Source vector

CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
[email protected] · NVD (Primary)5.0 / 10MediumCVSS 2.0Details
Attack complexity
Low
Confidentiality
Partial
Integrity
None
Availability
None
Attack vector
Network
Authentication
Not required

Source vector

AV:N/AC:L/Au:N/C:P/I:N/A:N

CVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.

Sources and advisories7

This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences