CVE-2025-1861: 
PHP vulnerability analysis and mitigation

Overview

A vulnerability was discovered 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, related to HTTP redirect handling. The issue stems from a limited location buffer size of 1024 bytes when parsing HTTP redirect responses, which is significantly lower than the RFC9110 recommended size of 8000 bytes (PHP Advisory, NVD).

Technical details

The vulnerability (CVE-2025-1861) is classified as CWE-131 (Incorrect Calculation of Buffer Size). It has been assigned a CVSS 4.0 Base Score of 6.3 (Medium) with the vector string 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. The issue specifically relates to the HTTP wrapper's handling of redirect locations, where the current implementation limits the buffer size to 1024 bytes, while browsers typically allow around 2048 bytes (NVD, PHP Advisory).

Impact

The vulnerability can lead to incorrect URL truncation and redirection to wrong locations. When the location value exceeds the 1024-byte limit, critical information might be omitted, particularly from query parameters. In some cases, this could result in a denial of service condition for the remote site if the truncated URL generates errors (PHP Advisory).

Exploitability

The vulnerability requires network access and can be exploited through HTTP redirect responses. No authentication is required for exploitation, though the attack complexity is considered low according to the CVSS scoring (NVD).

Mitigation and workarounds

No direct workarounds are available for this vulnerability. The recommended solution is to upgrade to the patched versions: PHP 8.1.32, 8.2.28, 8.3.19, or 8.4.5. Various Linux distributions have also released fixed packages, including Ubuntu and Debian (Ubuntu Security, Debian Security).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

php8.2: 8.2.28-1~deb12u1

Fixed

sid

php8.4: 8.4.5-1

Fixed

trixie

php8.4: 8.4.5-1

Fixed

Ubuntu

Fixed

bionic (esm-infra)

php7.2: 7.2.24-0ubuntu0.18.04.17+esm8

Fixed

focal

php7.4: 7.4.3-4ubuntu2.29

Fixed

focal (esm-infra)

php7.4: 7.4.3-4ubuntu2.29

Fixed

jammy

php8.1: 8.1.2-1ubuntu2.21

Fixed

noble

php8.3: 8.3.6-0ubuntu0.24.04.4

Fixed

questing

php8.4: 8.4.5-1

Fixed

trusty (esm-infra-legacy)

php5

Unknown

xenial (esm-infra-legacy)

php7.0: 7.0.33-0ubuntu0.16.04.16+esm15

Fixed

RHEL / CentOS

Fixed

RHEL 8

:appstream:php:7.4/php/php-0:7.4.33-3.module%2Bel8.10.0%2B23902%2Bd3c8dd8f

Fixed

RHEL 9

:appstream:php-0:8.0.30-3.el9_6.src

Fixed

RHEL 10

php-0:8.3.19-1.el10_0.src

Fixed

Alpine

Fixed

edge

php83: 8.3.18-r0

Fixed

v3.19

php81: 8.1.32-r0

Fixed

v3.20

php82: 8.2.28-r0

Fixed

v3.21

php82: 8.2.28-r0, 8.3.18-r0

Fixed

v3.22

php82: 8.2.28-r0, 8.3.18-r0

Fixed

v3.23

php83: 8.3.18-r0

Fixed

Source: This report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-25rf-99hr-7pmrHIGH8.1
  • PHP logoPHP
  • codeigniter4/framework
NoYesNov 01, 2026
GHSA-rgjx-wcgv-pw7gHIGH7.5
  • PHP logoPHP
  • adminneo-org/adminneo
NoYesNov 01, 2026
GHSA-ggh8-3chg-48w7HIGH7.2
  • PHP logoPHP
  • adminneo-org/adminneo
NoYesNov 01, 2026
GHSA-g478-vjq4-75hfMEDIUM5.3
  • PHP logoPHP
  • mage-os/module-blog
NoYesNov 02, 2026
GHSA-q5vv-mh5m-fxvmMEDIUMN/A
  • PHP logoPHP
  • adminneo-org/adminneo
NoYesNov 01, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management