cve.bz

CVE-2025-1861 Incorrect Calculation of Buffer Size

6.3 mediumEPSS 1.1%

Medium (6.3). EPSS 1.1% estimated probability of exploitation activity in the next 30 days.

On this page
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 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.

Severity

CVSS 4.0

6.3 medium
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

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.1% (up from 0.9% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 66th percentile. Scored 2026-11-25. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2025-03-31. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-131 Incorrect Calculation of Buffer Size
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-1861 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-1861?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-1861?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-1861 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
PHP Group PHPfrom 8.1.* before 8.1.32
PHP Group PHPfrom 8.2.* before 8.2.28
PHP Group PHPfrom 8.3.* before 8.3.19
PHP Group PHPfrom 8.4.* before 8.4.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11php7.47.4.33-1+deb11u8DLA-4088-1
Debian12php8.28.2.28-1~deb12u1DEBIAN-CVE-2025-1861 DSA-5878-1
Debian13, 14php8.48.4.5-1DEBIAN-CVE-2025-1861
Ubuntu20.04:LTSphp7.47.4.3-4ubuntu2.29UBUNTU-CVE-2025-1861 USN-7400-1
Ubuntu22.04:LTSphp8.18.1.2-1ubuntu2.21UBUNTU-CVE-2025-1861 USN-7400-1
Ubuntu24.04:LTSphp8.38.3.6-0ubuntu0.24.04.4UBUNTU-CVE-2025-1861 USN-7400-1
UbuntuPro:14.04:LTSphp5no fix listedUBUNTU-CVE-2025-1861
UbuntuPro:16.04:LTSphp7.07.0.33-0ubuntu0.16.04.16+esm15UBUNTU-CVE-2025-1861 USN-7645-1
UbuntuPro:18.04:LTSphp7.27.2.24-0ubuntu0.18.04.17+esm8UBUNTU-CVE-2025-1861 USN-7645-1
Red Hatenterprise_linux:8::appstreamapcu-panel, php-pecl-apcu, php-pecl-apcu-devel and 2 more0:5.1.18-1.module+el8.10.0+22485+a3539972RHSA-2026:2470
Red Hatenterprise_linux:8::appstreamapcu-panel, php-pecl-apcu, php-pecl-apcu-devel and 2 more0:5.1.23-1.module+el8.10.0+20770+a5eca186RHSA-2025:15687
Red Hatenterprise_linux:8::appstreamlibzip, libzip-devel, libzip-tools and 3 more0:1.6.1-1.module+el8.10.0+22485+a3539972RHSA-2026:2470
Red Hatenterprise_linux:8::appstreamlibzip, libzip-devel, libzip-tools and 3 more0:1.7.3-1.module+el8.10.0+20770+a5eca186RHSA-2025:15687
Red Hatenterprise_linux:8::appstreamphp, php-gd, php-cli and 51 more0:7.4.33-3.module+el8.10.0+23902+d3c8dd8fRHSA-2026:2470
Red Hatenterprise_linux:8::appstreamphp, php-gd, php-cli and 47 more0:8.2.28-1.module+el8.10.0+23472+dcd7a400RHSA-2025:15687
Red Hatenterprise_linux:8::appstreamphp-pear1:1.10.13-1.module+el8.10.0+22485+a3539972RHSA-2026:2470
Red Hatenterprise_linux:8::appstreamphp-pear1:1.10.14-1.module+el8.10.0+20770+a5eca186RHSA-2025:15687
Red Hatenterprise_linux:8::appstreamphp-pecl-rrd, php-pecl-rrd-debuginfo, php-pecl-rrd-debugsource0:2.0.1-1.module+el8.10.0+22485+a3539972RHSA-2026:2470
Red Hatenterprise_linux:8::appstreamphp-pecl-rrd, php-pecl-rrd-debuginfo, php-pecl-rrd-debugsource0:2.0.3-1.module+el8.10.0+20770+a5eca186RHSA-2025:15687
Red Hatenterprise_linux:8::appstreamphp-pecl-xdebug, php-pecl-xdebug-debuginfo, php-pecl-xdebug-debugsource0:2.9.5-1.module+el8.10.0+22485+a3539972RHSA-2026:2470
Red Hatenterprise_linux:8::appstreamphp-pecl-xdebug3, php-pecl-xdebug3-debuginfo, php-pecl-xdebug3-debugsource0:3.2.2-2.module+el8.10.0+20798+00eaeb41RHSA-2025:15687
41 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Server 15 SP3-LTSS and 1 morephp77.4.33-150200.3.76.1SUSE-SU-2025:1026-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 6 morephp8, php8-fpm, php8-test and 3 more8.0.30-150400.4.54.1SUSE-SU-2025:0994-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Legacy 15 SP6 and 4 morephp7, php7-fpm, php7-fastcgi and 1 more7.4.33-150400.4.48.1SUSE-SU-2025:1025-1
SUSELinux Enterprise Module for Package Hub 15 SP6php7-embed7.4.33-150400.4.48.1SUSE-SU-2025:1025-1
SUSELinux Enterprise Module for Web and Scripting 15 SP6php8, php8-fpm, php8-test and 3 more8.2.28-150600.3.16.1SUSE-SU-2025:1012-1
openSUSELeap 15.6php7, php7-fpm, php7-test and 3 more7.4.33-150400.4.48.1SUSE-SU-2025:1025-1
openSUSELeap 15.6php8, php8-fpm, php8-test and 3 more8.2.28-150600.3.16.1SUSE-SU-2025:1012-1
openSUSETumbleweedphp88.3.19-1.1openSUSE-SU-2025:14895-1
AlmaLinux8apcu-panel, php-pecl-apcu, php-pecl-apcu-devel5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2026:2470
AlmaLinux8apcu-panel, php-pecl-apcu, php-pecl-apcu-devel5.1.23-1.module_el8.10.0+3796+30ed3ef7ALSA-2025:15687
AlmaLinux8libzip, libzip-devel, libzip-tools1.6.1-1.module_el8.10.0+3935+28808425ALSA-2026:2470
AlmaLinux8libzip, libzip-devel, libzip-tools1.6.1-1.module_el8.6.0+3239+bedf0508ALSA-2026:2470
AlmaLinux8libzip, libzip-devel, libzip-tools1.7.3-1.module_el8.10.0+3796+30ed3ef7ALSA-2025:15687
AlmaLinux8libzip, libzip-tools1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2026:2470
AlmaLinux8php, php-gd, php-cli and 24 more7.4.33-3.module_el8.10.0+4114+3b36c618ALSA-2026:2470
AlmaLinux8php, php-gd, php-cli and 22 more8.2.28-1.module_el8.10.0+4046+958a243aALSA-2025:15687
AlmaLinux8php-pear1:1.10.13-1.module_el8.10.0+3935+28808425ALSA-2026:2470
AlmaLinux8php-pear1:1.10.14-1.module_el8.10.0+3796+30ed3ef7ALSA-2025:15687
AlmaLinux8php-pecl-apcu, php-pecl-apcu-devel5.1.18-1.module_el8.10.0+3935+28808425ALSA-2026:2470
AlmaLinux8php-pecl-rrd2.0.1-1.module_el8.10.0+3935+28808425ALSA-2026:2470
29 more for AlmaLinux in the JSON.
Rocky Linux8libzip0:1.6.1-1.module+el8.10.0+1912+72767185RLSA-2026:2470
Rocky Linux8libzip0:1.7.3-1.module+el8.10.0+1605+02e07af7RLSA-2025:15687
Rocky Linux8libzip0:1.7.3-1.module+el8.10.0+1911+f499711eRLSA-2025:15687
Rocky Linux8php-pear1:1.10.13-1.module+el8.10.0+1605+02e07af7RLSA-2026:2470
Rocky Linux8php-pear1:1.10.13-1.module+el8.10.0+1912+72767185RLSA-2026:2470
Rocky Linux8php-pear1:1.10.14-1.module+el8.10.0+1911+f499711eRLSA-2025:15687
Rocky Linux8php-pecl-apcu0:5.1.18-1.module+el8.10.0+1912+72767185RLSA-2026:2470
Rocky Linux8php-pecl-apcu0:5.1.23-1.module+el8.10.0+1911+f499711eRLSA-2025:15687
Rocky Linux8php-pecl-rrd0:2.0.1-1.module+el8.10.0+1912+72767185RLSA-2026:2470
Rocky Linux8php-pecl-rrd0:2.0.1-1.module+el8.4.0+414+2e7afcddRLSA-2026:2470
Rocky Linux8php-pecl-rrd0:2.0.3-1.module+el8.10.0+1605+02e07af7RLSA-2025:15687
Rocky Linux8php-pecl-rrd0:2.0.3-1.module+el8.10.0+1911+f499711eRLSA-2025:15687
23 more for Rocky Linux in the JSON.
Alpinev3.19php818.1.32-r0ALPINE-CVE-2025-1861
Alpinev3.20, v3.21, v3.22php828.2.28-r0ALPINE-CVE-2025-1861
Alpinev3.21, v3.22, v3.23 and 1 morephp838.3.18-r0ALPINE-CVE-2025-1861
Azure Linux2php8.1.32-1AZL-59306
Azure Linux3php8.3.19-1AZL-59330
Alpaquita23php818.1.32-r0BELL-CVE-2025-1861
Alpaquitastreamphp838.3.18-r0BELL-CVE-2025-1861

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Moderate-impact vulnerability affecting PHP in Red Hat Enterprise Linux: PHP's HTTP stream wrapper can truncate an HTTP redirect Location value at 1024 bytes, causing an HTTP client to follow an incorrect URL. Red Hat's CVSS 5.3 assessment reflects limited confidentiality impact with no integrity or availability impact established by the current evidence; the NIST 9.8 Critical score assumes high impact to confidentiality, integrity, and availability. The current scope marks selected Red Hat Enterprise Linux streams as affected or delegated, Red Hat Enterprise Linux 6 and 7 as out of standard support, and Red Hat In-Vehicle OS streams as deferred; for the deferred products, the residual risk is incorrect URL truncation and redirection, and remediation is deferred. Delegated Red Hat Enterprise Linux streams are being handled through the relevant product teams' remediation process. Fedora 40 and Fedora 41 are not affected because inline mitigations already exist.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10php-0:8.3.19-1.el10_0Fixed 2025-05-13RHSA-2025:7489
Red Hat Enterprise Linux 8php:8.2-8100020250903052702.f7998665Fixed 2025-09-11RHSA-2025:15687
Red Hat Enterprise Linux 8php:7.4-8100020260119075152.f7998665Fixed 2026-02-10RHSA-2026:2470
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportphp:7.4-8040020261122143307.d7c09045Fixed 2026-11-24RHSA-2026:103276
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-Onphp:7.4-8040020261122143307.d7c09045Fixed 2026-11-24RHSA-2026:103276
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportphp:7.4-8060020261122141928.5caa48ffFixed 2026-11-24RHSA-2026:102823
Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-Onphp:7.4-8060020261122141928.5caa48ffFixed 2026-11-24RHSA-2026:102823
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicephp:7.4-8080020261122140017.0b4eb31dFixed 2026-11-24RHSA-2026:102713
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionsphp:7.4-8080020261122140017.0b4eb31dFixed 2026-11-24RHSA-2026:102713
Red Hat Enterprise Linux 9php:8.1-9050020250423093228.9Fixed 2025-04-28RHSA-2025:4263
Red Hat Enterprise Linux 9php:8.3-9060020250409105946.9Fixed 2025-05-13RHSA-2025:7418
Red Hat Enterprise Linux 9php-0:8.0.30-3.el9_6Fixed 2025-05-13RHSA-2025:7431
Red Hat Enterprise Linux 9php:8.2-9060020250428130539.9Fixed 2025-05-13RHSA-2025:7432
Red Hat Enterprise Linux 6phpOut of support scope
Red Hat Enterprise Linux 7phpOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-1861.

Attack patterns (CAPEC)

  • CAPEC-47 Buffer Overflow via Parameter Expansion Likelihood: Medium · Severity: High
  • CAPEC-100 Overflow Buffers Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON