Skip to content
Heist/ feed
Back to feed
Low

Null byte termination in hostnames

Type: advisorySources: OSV

In PHP versions:8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, 8.4.* before 8.4.10 some functions like fsockopen() lack validation that the hostname supplied does not contain null characters. This may lead to other functions like parse_url() treat the hostname in different way, thus opening way to security problems if the user code implements access checks before access using such functions.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-1220
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 14:47 UTC · Revision 1

Source evidence

Null byte termination in hostnames

core-osv · Original source

Published 13 Jul 2025, 22:18 UTC

In PHP versions:8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, 8.4.* before 8.4.10 some functions like fsockopen() lack validation that the hostname supplied does not contain null characters. This may lead to other functions like parse_url() treat the hostname in different way, thus opening way to security problems if the user code implements access checks before access using such functions.

osv:CVE-2025-1220
Complete source record
{
  "id": "e04ae6725cdff9f6116aadbf921efa46a5267d5472a608d9f19178c8f28d3460",
  "url": "https://osv.dev/vulnerability/CVE-2025-1220",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Null byte termination in hostnames",
    "summary": "In PHP versions:8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, 8.4.* before 8.4.10 some functions like fsockopen() lack validation that the hostname supplied does not contain null characters. This may lead to other functions like parse_url() treat the hostname in different way, thus opening way to security problems if the user code implements access checks before access using such functions.",
    "evidence": "osv:CVE-2025-1220",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2025-1220",
      "aliases": [
        "BIT-libphp-2025-1220",
        "BIT-php-2025-1220",
        "BIT-php-min-2025-1220",
        "CVE-2025-1220",
        "GHSA-3cr5-j632-f35r"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/php/php-src",
              "type": "GIT",
              "events": [
                {
                  "introduced": "381ba9f5d0edd0c9c8ec1dea7e21d513ad08b115"
                },
                {
                  "fixed": "1996831969293a866863f7148f5416e99ea123cb"
                },
                {
                  "introduced": "70ee6c20ad97e02c2b8098aeea96fefbbc3ac5c2"
                },
                {
                  "fixed": "a6855fae73d7a969788e7ec916ae6c4cda2fc7e3"
                },
                {
                  "introduced": "d26068059e83fe40de3430a512471d194119bee0"
                },
                {
                  "fixed": "ad881e753961115ceaf340bc47e7151fd9be1b45"
                },
                {
                  "introduced": "b437f2b32eb364c9496d24abcc734272e5c9c980"
                },
                {
                  "fixed": "5b61b6dd838cd5fc70f1f1325dfdfd8730d966fb"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.1.0"
                      },
                      {
                        "fixed": "8.1.33"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.2.0"
                      },
                      {
                        "fixed": "8.2.29"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.3.0"
                      },
                      {
                        "fixed": "8.3.23"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.4.0"
                      },
                      {
                        "fixed": "8.4.10"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-1220.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.752198760Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2025/07/msg00017.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/1xxx/CVE-2025-1220.json",
        "https://github.com/php/php-src/security/advisories/GHSA-3cr5-j632-f35r",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-1220"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-918"
        ],
        "cna_assigner": "php",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/1xxx/CVE-2025-1220.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-1220",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 496520,
  "published_at": "2025-07-13T22:18:36.974+00:00"
}