CVE-2024-3096

published 29 Apr 2024 · updated 14 Nov 2026

PHP function password_verify can erroneously return true when argument contains NUL

6.5MediumCVSS 6.5EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in PHP 8.1.28, PHP 8.2.18 and PHP 8.3.5.

In PHP  version 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, if a password stored with password_hash() starts with a null byte (\x00), testing a blank string as the password via password_verify() will incorrectly return true.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
PHP GroupPHP>=8.1.* <8.1.28, >=8.2.* <8.2.18, >=8.3.* <8.3.58.1.28, 8.2.18, 8.3.5

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in PHP, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-3096 severity on Zeptric[![CVE-2024-3096](https://zeptric.io/badge/cve/CVE-2024-3096.svg)](https://zeptric.io/cve/CVE-2024-3096)