CVE-2026-63311: Lexical Path Traversal Checkcve-2026-63311-lexical-path-traversal-check
Lexical path checks (e.g., checking `os.path.isabs` or `..` substrings) do not protect against symlink traversal or canonicalization bypasses. Use `os.path.realpath` or `Path.resolve` and check containment (e.g., `os.path.commonpath` or `Path.is_relative_to`) against the base directory.