CVE-2025-1861: Stream HTTP wrapper truncates redirect location to 1024 bytes

Published Mar 13, 2025
·
Updated

Fixed (Stream HTTP wrapper truncate redirect location to 1024 bytes). (CVE-2025-1861)

Other sources

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.

— Debian

Affected Software

23 affected componentsFixes available
PHP PHP<8.2.28
8.2.28
debian/php7.4<=7.4.33-1+deb11u5
7.4.33-1+deb11u8
debian/php8.2<=8.2.26-1~deb12u1
8.2.28-1~deb12u1
debian/php8.4
8.4.5-1
PHP PHP>=8.1.0<8.1.31
PHP PHP>=8.2.0<8.2.26
PHP PHP>=8.3.0<8.3.14
PHP PHP>=8.4.0<8.4.5
NetApp Ontap=9
alpine/php81<8.1.32-r0
8.1.32-r0
alpine/php82<8.2.28-r0
8.2.28-r0
alpine/php82<8.2.28-r0
8.2.28-r0
alpine/php82<8.2.28-r0
8.2.28-r0
alpine/php83<8.3.18-r0
8.3.18-r0
alpine/php83<8.3.18-r0
8.3.18-r0
alpine/php83<8.3.18-r0
8.3.18-r0
alpine/php83<8.3.18-r0
8.3.18-r0
ubuntu/php5*
ubuntu/php7.0<7.0.33-0ubuntu0.16.04.16+esm15
7.0.33-0ubuntu0.16.04.16+esm15
ubuntu/php7.2<7.2.24-0ubuntu0.18.04.17+esm8
7.2.24-0ubuntu0.18.04.17+esm8
ubuntu/php7.4<7.4.3-4ubuntu2.29
7.4.3-4ubuntu2.29
ubuntu/php8.1<8.1.2-1ubuntu2.21
8.1.2-1ubuntu2.21
ubuntu/php8.3<8.3.6-0ubuntu0.24.04.4
8.3.6-0ubuntu0.24.04.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.2.28
  2. Upgrade

    Upgrade debian/php7.4 to a version that resolves this vulnerability.

    Fixed in 7.4.33-1+deb11u8
  3. Upgrade

    Upgrade debian/php8.2 to a version that resolves this vulnerability.

    Fixed in 8.2.28-1~deb12u1
  4. Upgrade

    Upgrade debian/php8.4 to a version that resolves this vulnerability.

    Fixed in 8.4.5-1
  5. Upgrade

    Upgrade alpine/php81 to a version that resolves this vulnerability.

    Fixed in 8.1.32-r0
  6. Upgrade

    Upgrade alpine/php82 to a version that resolves this vulnerability.

    Fixed in 8.2.28-r0
  7. Upgrade

    Upgrade alpine/php83 to a version that resolves this vulnerability.

    Fixed in 8.3.18-r0
  8. Upgrade

    Upgrade ubuntu/php7.0 to a version that resolves this vulnerability.

    Fixed in 7.0.33-0ubuntu0.16.04.16+esm15
  9. Upgrade

    Upgrade ubuntu/php7.2 to a version that resolves this vulnerability.

    Fixed in 7.2.24-0ubuntu0.18.04.17+esm8
  10. Upgrade

    Upgrade ubuntu/php7.4 to a version that resolves this vulnerability.

    Fixed in 7.4.3-4ubuntu2.29
  11. Upgrade

    Upgrade ubuntu/php8.1 to a version that resolves this vulnerability.

    Fixed in 8.1.2-1ubuntu2.21
  12. Upgrade

    Upgrade ubuntu/php8.3 to a version that resolves this vulnerability.

    Fixed in 8.3.6-0ubuntu0.24.04.4
  13. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.1.32
  14. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.3.19
  15. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.4.5

Event History

Mar 13, 2025
CVE Published
via PHP·12:00 AM
Data Sourced
via PHP·12:00 AM
DescriptionAffected Software
Updated
via PHP·12:00 AM
Affected Software
Mar 14, 2025
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software
Mar 30, 2025
CVE Published
via MITRE·05:57 AM
Data Sourced
via MITRE·05:57 AM
DescriptionWeakness
Data Sourced
via NVD·06:15 AM
DescriptionSeverityWeakness
Event
via NVD·06:15 AM
Data Sourced
via Red Hat·07:01 AM
DescriptionSeverityAffected Software
Jul 2, 2025
Data Sourced
via NVD·08:17 PM
Affected Software
Updated
via NVD·08:17 PM
Severity
Jun 17, 2026
Updated
via NVD·08:39 AM
Severity

Frequently Asked Questions

1

What is the severity of CVE-2025-1861?

CVE-2025-1861 has been classified as a moderate severity vulnerability.

2

How do I fix CVE-2025-1861?

To fix CVE-2025-1861, update PHP to version 8.3.19 or later.

3

What does CVE-2025-1861 affect?

CVE-2025-1861 affects PHP versions up to 8.3.19.

4

What is the nature of the vulnerability in CVE-2025-1861?

CVE-2025-1861 addresses a security issue that allows the truncation of HTTP redirect locations to 1024 bytes.

5

Is there a workaround for CVE-2025-1861?

There is no official workaround for CVE-2025-1861; updating to the fixed version is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203