Skip to main content

Improper Link Resolution Before File Access ('Link Following')

CVE-2023-6597

Severity High
Score 7.8/10

Summary

An issue was identified in the CPython "tempfile.TemporaryDirectory" class, impacting versions prior to 3.8, v3.8.x prior to v3.8.19, v3.9.x prior to v3.9.19, v3.10.0 prior to v3.10.14, v3.11.x prior to v3.11.8, v3.12.x prior to v3.12.1, and v3.13.x prior to v3.13.0a3. The "tempfile.TemporaryDirectory" class improperly dereferenced symlinks during cleanup when encountering permissions-related errors. This behavior could allow users capable of running privileged programs to modify the permissions of files referenced by Symlinks under certain conditions.

  • HIGH
  • LOCAL
  • HIGH
  • CHANGED
  • NONE
  • NONE
  • HIGH
  • NONE

CWE-59 - Improper Link Resolution Before File Access

'Improper link resolution before file access' occurs when software accesses a file resource but fails to verify that the file isn't a link or shortcut to another file. An attacker can potentially gain access to arbitrary files and from there the impact can vary, depending on the application, from sensitive data exposure to remote code execution.

Advisory Timeline

  • Published