LiveActive security incident?Get immediate response
CVE Record

CVE-2017-7189: main/streams/xp_socket.c in PHP 7.x before 2017-03-07 misparses fsockopen calls, such as by interpreting fs...

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.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This CVE describes a PHP 7.x socket parsing flaw where an application’s intended fixed port could be bypassed if the hostname came from untrusted input. Business risk depends on whether applications used fsockopen with user-controlled hosts and treated the separate port as a security control.

Executive priority

Treat this as a targeted legacy exposure issue, not a confirmed internet-wide emergency. Prioritize systems running old PHP 7.x code that opens outbound sockets based on user or partner-controlled host input.

Technical view

In PHP 7.x builds before 2017-03-07, main/streams/xp_socket.c could misparse fsockopen host and port inputs. A hostname containing an embedded port could be combined with the explicit port, then truncated so the embedded port was used instead. The impact is application-dependent.

Likely exposure

Exposure is most likely in legacy PHP 7.x applications that call fsockopen with an untrusted hostname argument while relying on a hardcoded port to enforce policy. The source bundle does not identify specific products, distributions, or exact affected package versions.

Exploitation context

The source bundle does not show KEV listing, active exploitation, exploit availability, or broad exploitation evidence. The risk scenario requires vulnerable PHP behavior plus application code that accepts attacker-influenced host strings and depends on a fixed port decision.

Researcher notes

The evidence is narrow but clear about the parsing behavior and the risky call pattern. No CVSS, CWE, affected CPEs, or exploitation data are provided. Validation should focus on runtime vintage and application-specific data flow into fsockopen.

Mitigation direction

  • Confirm deployed PHP builds include the fix after 2017-03-07.
  • Upgrade unsupported legacy PHP runtimes using vendor guidance.
  • Review fsockopen usage that accepts user-controlled hostnames.
  • Reject or normalize embedded ports when a fixed port is required.
  • Do not rely only on fsockopen argument separation for security policy.

Validation and detection

  • Inventory PHP runtime versions and build provenance.
  • Search application code for fsockopen calls with variable host arguments.
  • Identify paths where host input can come from users or external data.
  • Verify validation blocks embedded port values in hostname fields.
  • Check regression tests cover fixed-port policy enforcement.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2017-7189 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS and timeline data

No CVSS vectors or timeline events were available in the normalized CVE source material.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.