2025-12-27 19:33CVE-2025-14177php
PUBLISHED5.2CWE-125

Information Leak of Memory in getimagesize

In PHP versions:8.1.* before 8.1.34, 8.2.* before 8.2.30, 8.3.* before 8.3.29, 8.4.* before 8.4.16, 8.5.* before 8.5.1, the getimagesize() function may leak uninitialized heap memory into the APPn segments (e.g., APP1) when reading images in multi-chunk mode (such as via php://filter). This occurs due to a bug in php_read_stream_all_chunks() that overwrites the buffer without advancing the pointer, leaving tail bytes uninitialized. This may lead to information disclosure of sensitive heap data and affect the confidentiality of the target server.

Problem type

Affected products

PHP Group

PHP

< 8.1.34 - AFFECTED

< 8.2.30 - AFFECTED

< 8.3.29 - AFFECTED

< 8.4.16 - AFFECTED

< 8.5.1 - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2025-14177
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2025-14177",
    "assignerOrgId": "dd77f84a-d19a-4638-8c3d-a322d820ed2b",
    "assignerShortName": "php",
    "dateUpdated": "2025-12-27T19:33:23.973Z",
    "dateReserved": "2025-12-06T06:23:06.907Z",
    "datePublished": "2025-12-27T19:33:23.973Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "dd77f84a-d19a-4638-8c3d-a322d820ed2b",
        "shortName": "php",
        "dateUpdated": "2025-12-27T19:33:23.973Z"
      },
      "datePublic": "2025-12-18T00:00:00.000Z",
      "title": "Information Leak of Memory in getimagesize",
      "descriptions": [
        {
          "lang": "en",
          "value": "In PHP versions:8.1.* before 8.1.34, 8.2.* before 8.2.30, 8.3.* before 8.3.29, 8.4.* before 8.4.16, 8.5.* before 8.5.1, the getimagesize() function may leak uninitialized heap memory into the APPn segments (e.g., APP1) when reading images in multi-chunk mode (such as via php://filter). This occurs due to a bug in php_read_stream_all_chunks() that overwrites the buffer without advancing the pointer, leaving tail bytes uninitialized. This may lead to information disclosure of sensitive heap data and affect the confidentiality of the target server.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "<p>In PHP versions:8.1.* before 8.1.34, 8.2.* before 8.2.30, 8.3.* before 8.3.29, 8.4.* before 8.4.16, 8.5.* before 8.5.1, the getimagesize() function may leak uninitialized heap memory into the APPn segments (e.g., APP1) when reading images in multi-chunk mode (such as via php://filter). This occurs due to a bug in php_read_stream_all_chunks() that overwrites the buffer without advancing the pointer, leaving tail bytes uninitialized. This may lead to information disclosure of sensitive heap data and affect the confidentiality of the target server.</p>"
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "PHP Group",
          "product": "PHP",
          "packageName": "php",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "8.1.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.1.34"
            },
            {
              "version": "8.2.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.2.30"
            },
            {
              "version": "8.3.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.3.29"
            },
            {
              "version": "8.4.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.4.16"
            },
            {
              "version": "8.5.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.5.1"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-125 Out-of-bounds Read",
              "cweId": "CWE-125",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/php/php-src/security/advisories/GHSA-3237-qqm7-mfv7"
        }
      ],
      "metrics": [
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "Nikita Sveshnikov (Positive Technologies)",
          "type": "reporter"
        }
      ]
    }
  }
}