Advisories · PHP & Laravel
CVE-2024-3096
Medium
CVSS 6.5
PHP password_verify NUL bypass
Disclosed 2024 · Last reviewed 2 Dec 2026
password_verify could accept a password that embedded a NUL when the stored hash was compared incorrectly.
What happened
The verification path stopped at a NUL inside the supplied password.
Affected and patched versions
- Affected
- PHP 8.1 before 8.1.28, 8.2 before 8.2.18, and 8.3 before 8.3.6.
- Patched
- PHP 8.1.28, 8.2.18, 8.3.6, and later.
How to check your server
Check
php -v
How to fix and harden
- Upgrade PHP to 8.1.28, 8.2.18, 8.3.6, or later.
- Application code should still store passwords with password_hash and check them only with password_verify.
Fix
php -v
Sources
Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON