CVE-2024-3096

PHP function password_verify can erroneously return true when argument contains NUL

Published Apr 29, 2024 CVSS 3.1 · 6.5 Medium EPSS 1.5% KEV · Not listed
Description
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.

Remediation

Vendor Workaround

Pre-filter potential password strings to ensure they do not contain NUL bytes.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3810-1 php7.3 security update
Debian DSA Debian DSA DSA-5660-1 php7.4 security update
Debian DSA Debian DSA DSA-5661-1 php8.2 security update
EUVD EUVD EUVD-2024-31701 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.
Ubuntu USN Ubuntu USN USN-6757-1 PHP vulnerabilities
Ubuntu USN Ubuntu USN USN-6757-2 PHP vulnerabilities
History
Type Values Removed Values Added
First Time appeared Php Group
Php Group php
CPEs cpe:2.3:a:php_group:php:8.1.0:*:*:*:*:*:*:*
cpe:2.3:a:php_group:php:8.2.0:*:*:*:*:*:*:*
cpe:2.3:a:php_group:php:8.3.0:*:*:*:*:*:*:*
Vendors & Products Php Group
Php Group php
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics epss

{'score': 0.00205}

epss

{'score': 0.00151}

Type Values Removed Values Added
First Time appeared Debian
Debian debian Linux
Php
Php php
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
Vendors & Products Debian
Debian debian Linux
Php
Php php
Type Values Removed Values Added
Description 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. 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.
Type Values Removed Values Added
First Time appeared Redhat
Redhat enterprise Linux
CPEs cpe:/a:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
Nov 4, 2025, 5:19 PM
Reserved
Mar 29, 2024, 4:57 PM
Status
Modified
Published
Apr 29, 2024, 4:15 AM
Modified
Jun 17, 2026, 7:43 AM
Severity
Low
Public date
Apr 12, 2024, 12:00 AM