Stack-memory corruption via undersized path buffers
Published Feb 16, 2023 · Updated Mar 18, 2025
Buffer size miscalculation in PHP 8.0 before 8.0.28, 8.1 before 8.1.16, and 8.2 before 8.2.3 allows attackers to corrupt stack memory. Path resolution code in fopen wrappers, DOM parsing, and XMLReader allocates MAXPATHLEN-byte arrays, then appends a slash and writes a terminating NUL at index MAXPATHLEN. The gate is attacker influence over a filename near the system path-length limit plus user interaction; the overwrite allows unauthorized data access or modification.
Summary
What happened
Buffer size miscalculation in PHP 8.0 before 8.0.28, 8.1 before 8.1.16, and 8.2 before 8.2.3 allows attackers to corrupt stack memory. Path resolution code in fopen wrappers, DOM parsing, and XMLReader allocates MAXPATHLEN-byte arrays, then appends a slash and writes a terminating NUL at index MAXPATHLEN. The gate is attacker influence over a filename near the system path-length limit plus user interaction; the overwrite allows unauthorized data access or modification.
The record
- CVE
- CVE-2023-0568
- Published
- Feb 16, 2023
- Updated
- Mar 18, 2025
- Vendor
- The PHP Group
- Product
- PHP
- Classifications
- CWE-131
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Feb 16, 2023CVE publishedPublication date reported by the CVE source.
- Mar 18, 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.0.x <8.0.28
- Affected versionversion=8.1.x <8.1.16
- Affected versionversion=8.2.x <8.2.3
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
No public exploit references are available in this record.
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