CVE-2024-3096

PHP function password_verify can erroneously return true when argument contains NUL

State
Published
Severity
6.5 Medium
Published
Apr 29, 2024
Updated
Nov 4, 2025
Reserved
Mar 29, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.16.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:Nphp

Weaknesses

  • CWE-20 Improper Input Validation

Affected Products

ProductVersions
PHPPHP Group
  • 8.1.* to before 8.1.28Affected
  • 8.2.* to before 8.2.18Affected
  • 8.3.* to before 8.3.5Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.