CVE-2024-3096
PHP function password_verify can erroneously return true when argument contains NUL
Reported by php · Published April 29, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| php8.2-process | Amazon Linux | 8.2.18-1.amzn2023.0.1 |
| php8.2-ffi | Amazon Linux | 8.2.18-1.amzn2023.0.1 |
| php8.2-common | Amazon Linux | 8.2.18-1.amzn2023.0.1 |
| php8.2-mbstring | Amazon Linux | 8.2.18-1.amzn2023.0.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| PHP Group | PHP | 8.1.*, 8.2.*, 8.3.* |
| amazon:2023 | php8.2-process | 0 |
| amazon:2023 | php8.2-ffi | 0 |
| amazon:2023 | php8.2-common | 0 |
| amazon:2023 | php8.2-mbstring | 0 |
| php_group | php | 8.2.0, 8.1.0, 8.3.0 |
| amazon:2023 | php8.2-xml | 0 |
| amazon:2023 | php8.2-pgsql | 0 |
| amazon:2023 | php8.1-pspell | 0 |
| amazon:2023 | php8.1-dba | 0 |
| amazon:2023 | php8.2-odbc | 0 |
| amazon:2023 | php8.1-intl | 0 |
| amazon:2023 | php8.2-ldap | 0 |
| amazon:2023 | php8.2-mysqlnd | 0 |
| amazon:2023 | php8.1-cli | 0 |
| amazon:2023 | php8.1-xml | 0 |
| amazon:2023 | php8.1-gd | 0 |
| amazon:2023 | php8.1-enchant | 0 |
| amazon:2023 | php8.1-dbg | 0 |
| amazon:2023 | php8.1-snmp | 0 |
…and 43 more
Timeline
- Apr 11, 2024 CVE Published
- Apr 29, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (17 in total, the first dated here)
- Oct 23, 2026 Distribution Patch (7 in total, the first dated here)
- Oct 23, 2026 Security Advisory (10 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-3096
vulnetix vdb fixes CVE-2024-3096
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-3096/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart