SSRF via null-byte hostname truncation
Published Jul 13, 2025 · Updated Nov 4, 2025
SSRF in fsockopen() in The PHP Group PHP allows attackers to connect to unintended hosts through null-byte hostname truncation. The stream transport passes the hostname to lower-level address resolution without rejecting embedded nulls, so resolution stops before the suffix that a length-aware parser checks. Exploitation requires application code to validate an attacker-controlled host with different parsing semantics and then pass the same value to fsockopen().
Summary
What happened
SSRF in fsockopen() in The PHP Group PHP allows attackers to connect to unintended hosts through null-byte hostname truncation. The stream transport passes the hostname to lower-level address resolution without rejecting embedded nulls, so resolution stops before the suffix that a length-aware parser checks. Exploitation requires application code to validate an attacker-controlled host with different parsing semantics and then pass the same value to fsockopen().
The record
- CVE
- CVE-2025-1220
- Published
- Jul 13, 2025
- Updated
- Nov 4, 2025
- Vendor
- The PHP Group
- Product
- PHP
- Classifications
- CWE-918, T1190
- Attack vector
- network
- Privileges
- Unavailable
Timeline
How it unfolded
- Jul 13, 2025CVE publishedPublication date reported by the CVE source.
- Nov 4, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=8.1.* <8.1.33
- Affected versionversion=8.2.* <8.2.29
- Affected versionversion=8.3.* <8.3.23
- Affected versionversion=8.4.* <8.4.10
What conditions does exploitation require?
What is affected?
Published CVSS scores
No CVSS assessment is available in this record.
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Upstream fsockopen null-byte proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo