title: Buffer overflow and overread in phar_dir_read()
description: In PHP version 8.0.* before 8.0.30,  8.1.* before 8.1.22, and 8.2.* before 8.2.8, when loading phar file, while reading PHAR directory entries, insufficient length checking may lead to a stack buffer overflow, leading potentially to memory corruption or RCE.
problem types: CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
affected:
{
defaultStatus: affected
product: PHP
vendor: PHP Group
versions:
lessThan: 8.0.30, status: affected, version: 8.0.*, versionType: semver
lessThan: 8.1.22, status: affected, version: 8.1.*, versionType: semver
lessThan: 8.2.8, status: affected, version: 8.2.*, versionType: semver
}
metrics:
cvssV3_1: [
attackComplexity: LOW
attackVector: NETWORK
availabilityImpact: LOW
baseScore: 9.4
baseSeverity: CRITICAL
confidentialityImpact: HIGH
integrityImpact: HIGH
privilegesRequired: NONE
scope: UNCHANGED
userInteraction: NONE
vectorString: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
version: 3.1
]
format: CVSS
scenarios: GENERAL