CVE-2025-1861
Php 8.1.0 – 8.1.31
Raw vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2025-1861 is a medium-severity Incorrect Calculation of Buffer Size (CWE-131) vulnerability in Php. Its CVSS base score is 6.3 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 41% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-8 (Security and Privacy Engineering Principles) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
The vulnerability is an incorrect buffer size calculation (CWE-131) in PHP versions 8.1 before 8.1.32, 8.2 before 8.2.28, 8.3 before 8.3.19, and 8.4 before 8.4.5. When the PHP HTTP client parses a Location header in a redirect response, it uses a fixed 1024-byte buffer instead of the 8000-byte limit recommended by RFC 9110, which can cause the URL to be truncated incorrectly and the client to follow a malformed or attacker-controlled destination.
An unauthenticated remote attacker who can influence or observe an HTTP redirect response seen by a vulnerable PHP application may be able to cause the client to connect to an unintended host or path, resulting in limited information disclosure or unintended request behavior.
The referenced GitHub security advisory and vendor notices direct users to upgrade to the fixed releases listed above; Debian and NetApp have issued corresponding package updates that apply the same patches.
The associated EPSS score has remained flat at a low value of 0.0103 with no observed rise after disclosure.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2025-15117
Vulnerability Data
In PHP from 8.1.* before 8.1.32, from 8.2.* before 8.2.28, from 8.3.* before 8.3.19, from 8.4.* before 8.4.5, when parsing HTTP redirect in the response to an HTTP request, there is currently limit on the location value size caused by…
more
limited size of the location buffer to 1024. However as per RFC9110, the limit is recommended to be 8000. This may lead to incorrect URL truncation and redirecting to a wrong location.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
Developer security testing and code review can discover incorrect buffer-size computations before deployment.
Secure engineering principles directly require correct buffer-size arithmetic and bounds-checked allocation.
Input validation can enforce that supplied lengths or counts used in size calculations are within safe bounds.
Memory-protection mechanisms limit the exploitability of an overflow that results from an incorrect size calculation.
Flaw-remediation processes that include vulnerability scanning or static analysis will surface buffer-size errors.
Mitigating Controls (NIST CSF 2.0)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Secure SDLC practices directly prevent buffer-size miscalculations via coding standards, reviews, and testing, while fixing this single weakness only partially fulfills the broader control.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
Training technical teams on secure coding practices (including buffer handling and integer overflow awareness) reduces but does not eliminate incorrect buffer size calculations; the defect is a specific arithmetic/implementation error that even trained developers commit, and the strongest control is testing (A.8.29), not training.
Secure coding standards directly require correct buffer-size calculations.
Security testing can detect buffer-size errors before release.
A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary software implementation defects in delivered code the way those practices do; CWE-131 is a regular software weakness introduced at implementation, the same class as CWE-134 which the owner graded `partial` for the same reason.
A.8.8's reach is DISCLOSURE — it sees only instances that carry a vendor-published flaw, and CWE-131 commonly surfaces as CVEs in third-party components (font libraries, JavaScript engines, kernels), so the disclosed share is non-trivial; but the bulk of buffer-size calculation errors live in first-party custom code that never receives a CVE, and A.8.8's reach does not extend to source-reading tests on the organisation's own code (that is A.8.29's territory), leaving a nameable majority of instances outside its view.