title: Array overrun in common path resolve code
description: In PHP 8.0.X before 8.0.28, 8.1.X before 8.1.16 and 8.2.X before 8.2.3, core path resolution function allocate buffer one byte too small. When resolving paths with lengths close to system MAXPATHLEN setting, this may lead to the byte after the allocated buffer being overwritten with NUL value, which might lead to unauthorized data access or modification.
problem types: CWE-131 Incorrect Calculation of Buffer Size
affected:
{
defaultStatus: affected
product: PHP
repo: https://github.com/php/php-src
vendor: PHP Group
versions:
lessThan: 8.0.28, status: affected, version: 8.0.x, versionType: semver
lessThan: 8.1.16, status: affected, version: 8.1.x, versionType: semver
lessThan: 8.2.3, status: affected, version: 8.2.x, versionType: semver
}
metrics:
cvssV3_1: [
attackComplexity: HIGH
attackVector: NETWORK
availabilityImpact: HIGH
baseScore: 7.5
baseSeverity: HIGH
confidentialityImpact: HIGH
integrityImpact: HIGH
privilegesRequired: NONE
scope: UNCHANGED
userInteraction: REQUIRED
vectorString: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
version: 3.1
]
format: CVSS
scenarios: GENERAL