Skip to content
PHP News
Search

PHP security advisory

Null byte termination in hostnames

low PHP · Not reviewed by PHP News yet
CVE
CVE-2025-1220
GHSA
GHSA-3cr5-j632-f35r
Source
php-src
Reported
Jul 3, 2025

Affected and fixed versions

In PHP itself. Find the row for the version you run, and update to the release next to it.

If you run Update to Support
8.4.0 – 8.4.9 8.4.10 Supported
8.3.0 – 8.3.22 8.3.23 Supported
8.2.0 – 8.2.28 8.2.29 Supported
Show 1 older branch, no longer supported
8.1.0 – 8.1.32 8.1.33

Upgrade

Update PHP to the release for the branch you are on, wherever it is installed: your Docker image, server packages or hosting panel. Branches past end of life get no fix, so move to a supported branch.

  • PHP 8.4.10
  • PHP 8.3.23
  • PHP 8.2.29

Check your app with an agent

Paste this into a coding agent that can read your project, such as Claude Code, Codex or Amp. It finds the PHP versions your project runs on and checks them against the versions above, without changing anything.

Check whether the PHP project you have access to runs a PHP version affected by this security advisory in PHP itself, and tell me what to update. Do a read-only check: don't edit files, don't change any PHP install, and don't try to reproduce the flaw.

Advisory: Null byte termination in hostnames (CVE-2025-1220, GHSA-3cr5-j632-f35r)
Details: https://phpnews.net/security/php/ghsa-3cr5-j632-f35r

Fixed releases on branches that still get security fixes:
- 8.4.0 – 8.4.9: update to 8.4.10
- 8.3.0 – 8.3.22: update to 8.3.23
- 8.2.0 – 8.2.28: update to 8.2.29

Branches past end of life get no fix: any version on one of them should be treated as affected.

1. Find every place the project pins or installs PHP: Dockerfiles and compose files, CI workflows, deploy and provisioning scripts, platform config (.php-version, Forge, Vapor, Cloud or Herd settings), and composer.json's config.platform.php and require.php.
2. For each, read the PHP version it runs. Where only a branch is given (php:8.3, PHP 8.3), say the patch version depends on when the image or server was last updated.
3. Compare each version with the fixed releases above.
4. Read the advisory and say whether the project uses what it describes (a function, extension or SAPI). Say which you could check and which you couldn't.
5. Report a table: file | PHP version | affected (yes, no or unknown) | uses the affected feature (yes, no or unknown) | update to | evidence.

Sources

← All PHP advisories