Wrong redirects via fixed-size Location buffer
Published Mar 30, 2025 · Updated Nov 3, 2025
URL truncation in the PHP HTTP stream wrapper allows remote attackers to misdirect requests through a crafted HTTP redirect response. The response parser copies an untrusted Location value into a fixed 1,024-byte stack buffer with strlcpy, silently discarding the remainder before constructing the next request URL. Affected releases are PHP 8.1 before 8.1.32, PHP 8.2 before 8.2.28, PHP 8.3 before 8.3.19, and PHP 8.4 before 8.4.5; exploitation requires PHP code to follow an attacker-controlled redirect, and truncation can omit query data, select another resource, or cause a remote-site error.
Summary
What happened
URL truncation in the PHP HTTP stream wrapper allows remote attackers to misdirect requests through a crafted HTTP redirect response. The response parser copies an untrusted Location value into a fixed 1,024-byte stack buffer with strlcpy, silently discarding the remainder before constructing the next request URL. Affected releases are PHP 8.1 before 8.1.32, PHP 8.2 before 8.2.28, PHP 8.3 before 8.3.19, and PHP 8.4 before 8.4.5; exploitation requires PHP code to follow an attacker-controlled redirect, and truncation can omit query data, select another resource, or cause a remote-site error.
The record
- CVE
- CVE-2025-1861
- Published
- Mar 30, 2025
- Updated
- Nov 3, 2025
- Vendor
- The PHP Group
- Product
- PHP
- Classifications
- Unavailable
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 30, 2025CVE publishedPublication date reported by the CVE source.
- Nov 3, 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.32
- Affected versionversion=8.2.* <8.2.28
- Affected versionversion=8.3.* <8.3.19
- Affected versionversion=8.4.* <8.4.5
What conditions does exploitation require?
What is affected?
Published CVSS scores
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
No sourced classifications are available.
Public exploit references
No public exploit references are available in this record.
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