Skip to content
Heist/ feed
Back to feed
Medium

Stream HTTP wrapper truncates redirect location to 1024 bytes

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-1861
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:25 UTC · Revision 1

Source evidence

Stream HTTP wrapper truncates redirect location to 1024 bytes

core-osv · Original source

Published 30 Mar 2025, 05:57 UTC

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.

osv:CVE-2025-1861
Complete source record
{
  "id": "7b2930d8f075248a611fb662f90101ab39a51a297ad668149c4001f399a1b2f2",
  "url": "https://osv.dev/vulnerability/CVE-2025-1861",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Stream HTTP wrapper truncates redirect location to 1024 bytes",
    "summary": "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.",
    "evidence": "osv:CVE-2025-1861",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-1861",
      "aliases": [
        "BIT-libphp-2025-1861",
        "BIT-php-2025-1861",
        "BIT-php-min-2025-1861",
        "CVE-2025-1861",
        "GHSA-52jp-hrpf-2jff"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/php/php-src",
              "type": "GIT",
              "events": [
                {
                  "introduced": "381ba9f5d0edd0c9c8ec1dea7e21d513ad08b115"
                },
                {
                  "fixed": "38123aca18c3c1bd1f109ec77af2f175d7afcf35"
                },
                {
                  "introduced": "70ee6c20ad97e02c2b8098aeea96fefbbc3ac5c2"
                },
                {
                  "fixed": "a3695d49e878eb2ebbf4645a0975cb5e225fbc7d"
                },
                {
                  "introduced": "d26068059e83fe40de3430a512471d194119bee0"
                },
                {
                  "fixed": "dc83dee9003edfff53f0f7d057bf79650c7f10dc"
                },
                {
                  "introduced": "b437f2b32eb364c9496d24abcc734272e5c9c980"
                },
                {
                  "fixed": "23e05bdcf23319f4922513a91bb0d5e3925d5249"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.1.0"
                      },
                      {
                        "fixed": "8.1.31"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.2.0"
                      },
                      {
                        "fixed": "8.2.26"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.3.0"
                      },
                      {
                        "fixed": "8.3.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.4.0"
                      },
                      {
                        "fixed": "8.4.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-1861.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.420228272Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2025/03/msg00014.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/1xxx/CVE-2025-1861.json",
        "https://github.com/php/php-src/security/advisories/GHSA-52jp-hrpf-2jff",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-1861",
        "https://security.netapp.com/advisory/ntap-20250523-0005/"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-131"
        ],
        "cna_assigner": "php",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/1xxx/CVE-2025-1861.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-1861",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504676,
  "published_at": "2025-03-30T05:57:57.894+00:00"
}