description: An issue was found in the CPython `tempfile.TemporaryDirectory` class affecting versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior.
The tempfile.TemporaryDirectory class would dereference symlinks during cleanup of permissions-related errors. This means users which can run privileged programs are potentially able to modify permissions of files referenced by symlinks in some circumstances.
affected:
{
defaultStatus: unaffected
product: CPython
repo: https://github.com/python/cpython
vendor: Python Software Foundation
versions:
lessThanOrEqual: 3.12.1, status: affected, version: 3.12.0, versionType: python
lessThanOrEqual: 3.11.7, status: affected, version: 3.11.0, versionType: python
lessThanOrEqual: 3.10.13, status: affected, version: 3.10.0, versionType: python
lessThanOrEqual: 3.9.18, status: affected, version: 3.9.0, versionType: python
lessThanOrEqual: 3.8.18, status: affected, version: 0, versionType: python
}
metrics:
cvssV3_1: [
attackComplexity: HIGH
attackVector: LOCAL
availabilityImpact: NONE
baseScore: 7.8
baseSeverity: HIGH
confidentialityImpact: HIGH
integrityImpact: HIGH
privilegesRequired: NONE
scope: CHANGED
userInteraction: NONE
vectorString: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
version: 3.1
]
format: CVSS
scenarios: GENERAL