What’s Vulnerable › Vulnerabilities
CVE-2024-3096: PHP function password_verify can erroneously return true when argument contains NUL
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.5% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-04-29 · updated 2026-06-17
- Weakness: CWE-20
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.
Affected products
- Debian Linux: 10.0
- PHP: from 8.1.0 before 8.1.28; from 8.2.0 before 8.2.18; from 8.3.0 before 8.3.5 — fixed in 8.1.28, 8.2.18, 8.3.5
How to fix
Upgrade to a fixed version: PHP 8.1.28, 8.2.18, 8.3.5. Check the vendor advisory for mitigations.
References
- http://www.openwall.com/lists/oss-security/2024/04/12/11
- https://github.com/php/php-src/security/advisories/GHSA-h746-cjrr-wfmr
- https://lists.debian.org/debian-lts-announce/2024/05/msg00005.html
- https://security.netapp.com/advisory/ntap-20240510-0010/
- http://www.openwall.com/lists/oss-security/2024/04/12/11
- https://github.com/php/php-src/security/advisories/GHSA-h746-cjrr-wfmr
- https://lists.debian.org/debian-lts-announce/2024/05/msg00005.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/
- https://security.netapp.com/advisory/ntap-20240510-0010/
Get alerted when CVE-2024-3096 or the next vulnerability affects your stack