{"vuln_id":"CVE-2024-3096","aliases":["CVE-2023-3823","CVE-2023-3824","CVE-2024-2756","GHSA-h746-cjrr-wfmr"],"description":"php8.2 - security update","published_at":"2024-04-11T22:59:01Z","modified_at":"2026-11-20T01:19:09.968468Z","first_seen_at":"2026-11-21T19:15:06.060544Z","severity":"medium","severity_source":"cvss","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","cwe":["CWE-626"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.01492,"epss_percentile":0.74665,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-3096"},"matched_alias":null,"items":[{"id":493,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DEBIAN-CVE-2024-3096 / CVE-2024-3096 - 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…","summary":"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.\n\nAffected: Debian:12:php8.2\n\nFixed in: 8.2.18-1~deb12u1\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2024-3096","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2024-3096","published_at":"2024-04-29T04:15:08.350000Z","updated_at":"2026-11-02T12:02:15.105005Z","fetched_at":"2026-11-21T19:15:05.963744Z","severity":"medium","cvss_score":6.5,"epss":0.01492,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2024-3096","vuln_ids":["CVE-2023-3823","CVE-2023-3824","CVE-2024-2756","CVE-2024-3096","DEBIAN-CVE-2024-3096","GHSA-H746-CJRR-WFMR"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":382,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/493","html":"https://vulnwatch.ve1ve2.com/item/493"}},{"id":484,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DSA-5661-1 / CVE-2023-3823 - php8.2 - security update","summary":"Affected: Debian:12:php8.2\n\nFixed in: 8.2.18-1~deb12u1","url":"https://osv.dev/vulnerability/DSA-5661-1","published_at":"2024-04-15T00:00:00Z","updated_at":"2026-11-20T01:19:09.968468Z","fetched_at":"2026-11-21T19:15:05.963731Z","severity":"critical","cvss_score":9.8,"epss":0.38115,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2023-3823","vuln_ids":["CVE-2022-31629","CVE-2023-3823","CVE-2023-3824","CVE-2024-2756","CVE-2024-3096","DSA-5661-1","GHSA-3QRF-M4J2-PCRR","GHSA-C43M-486J-J32P","GHSA-H746-CJRR-WFMR","GHSA-JQCX-CCGC-XWHV","GHSA-WPJ3-HF5J-X4V4"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":379,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/484","html":"https://vulnwatch.ve1ve2.com/item/484"}},{"id":12677,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-h746-cjrr-wfmr / CVE-2024-3096: password_verify can erroneously return true, opening ATO risk","summary":"password_verify can erroneously return true, opening ATO risk\n\n### Summary\r\nIf 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`.\r\n\r\nIf a user were able to create a password with a leading null byte (unlikely, but syntactically valid), an attacker could trivially compromise the victim's account by attempting to sign in with a blank string.\r\n\r\n### Details\r\n\r\n```\r\n$ php -v\r\nPHP 8.3.2 (cli) (built: Jan 16 2024 13:46:41) (NTS)\r\nCopyright (c) The PHP Group\r\nZend Engine v4.3.2, Copyright (c) Zend Technologies\r\n    with Xdebug v3.3.0, Copyright (c) 2002-2023, by Derick Rethans\r\n    with Zend OPcache v8.3.2, Copyright (c), by Zend Technologies\r\n```\r\n\r\nThis appears to exist at least back to 8.1.0: https://3v4l.org/Z0pcl\r\n\r\n### PoC\r\n $ cat pw_bug.php\r\n```php\r\n<?php\r\n\r\ndeclare(strict_types=1);\r\n\r\n$pw = \"\\x00\\x30\";\r\n$hash = password_hash($pw, PASSWORD_DEFAULT);\r\n\r\nassert(password_verify(password: 'wrong', hash: $hash) === false, 'Incorect password should not verify');\r\nassert(password_verify(password: '', hash: $hash) === false, 'Blank password should not verify');\r\nassert(password_verify(password: $pw, hash: $hash) === true, 'Correct password should verify');\r\nassert(password_verify(password: strrev($pw), hash: $hash) === false, 'Reversed correct password not should verify');\r\n```\r\n\r\n$ php pw_bug.php\r\n```\r\nAssertionError: Blank password should not verify in .../pw_bug.php on line 9\r\n\r\nCall Stack:\r\n    0.0002     496408   1. {main}() .../pw_bug.php:0\r\n    0.1998     496536   2. assert($assertion = FALSE, $description = 'Blank password should not verify') .../pw_bug.php:9\r\n```\r\n\r\n### Impact\r\nMedium?\r\n\r\nThis could be catastrophic in the right circumstance, but the chance of that circumstance existing is extremely low. Typically a user would get blocked from setting a password containing (never mind starting with) binary data through input filtering and application-specific password rules. Similar rules are likely employed on the checking side, though usually less strict.\nPatched:   8.1.28,  8.2.18,  8.3.6","url":"https://github.com/php/php-src/security/advisories/GHSA-h746-cjrr-wfmr","published_at":"2024-04-11T22:59:01Z","updated_at":"2024-04-11T22:59:02Z","fetched_at":"2026-11-22T14:05:37.431202Z","severity":"medium","cvss_score":6.5,"epss":0.01492,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2024-3096","vuln_ids":["CVE-2023-3823","CVE-2023-3824","CVE-2024-2756","CVE-2024-3096","GHSA-H746-CJRR-WFMR"],"tags":["repo-advisory","CWE-626","security","repo:php/php-src","stack"],"cluster_id":11790,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12677","html":"https://vulnwatch.ve1ve2.com/item/12677"}}]}