Account takeover via NUL-truncated password verification
Published Apr 29, 2024 · Updated Nov 4, 2025
Null-byte handling in PHP 8.1.0 through 8.1.27, 8.2.0 through 8.2.17, and 8.3.0 through 8.3.4 allows attackers to take over accounts. The password_verify() path treats a leading NUL in a password_hash() result as a string terminator, so an empty candidate is accepted as matching. Exploitation requires an application to accept and store a password beginning with a NUL byte; remote attackers can then sign in to that account with a blank password.
Summary
What happened
Null-byte handling in PHP 8.1.0 through 8.1.27, 8.2.0 through 8.2.17, and 8.3.0 through 8.3.4 allows attackers to take over accounts. The password_verify() path treats a leading NUL in a password_hash() result as a string terminator, so an empty candidate is accepted as matching. Exploitation requires an application to accept and store a password beginning with a NUL byte; remote attackers can then sign in to that account with a blank password.
The record
- CVE
- CVE-2024-3096
- Published
- Apr 29, 2024
- Updated
- Nov 4, 2025
- Vendor
- The PHP Group
- Product
- PHP
- Classifications
- CWE-20, CWE-626, CAPEC-52, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Apr 29, 2024CVE publishedPublication date reported by the CVE source.
- Nov 4, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=8.1.0
- Affected versionversion=8.1.* <8.1.28
- Affected versionversion=8.2.0
- Affected versionversion=8.2.* <8.2.18
- Affected versionversion=8.3.0
- Affected versionversion=8.3.* <8.3.5
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Upstream password_verify proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo