CVE-2026-115353: Python Path Traversal Uncontained Join Open

Path traversal (CWE-22): a file path is built with os.path.join($BASE, $P) and passed to open() without proving the resolved target stays inside $BASE. os.path.join silently discards $BASE when $P is absolute, and os.path.normpath only collapses "../" lexically, so an attacker-controlled $P can read any file readable by the process. Reject absolute arguments

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-115353-python-path-traversal-uncontained-join-open --engine opengrep

Description

Path traversal (CWE-22): a file path is built with os.path.join($BASE, $P) and passed to open() without proving the resolved target stays inside $BASE. os.path.join silently discards $BASE when $P is absolute, and os.path.normpath only collapses "../" lexically, so an attacker-controlled $P can read any file readable by the process. Reject absolute arguments