CVE-2026-4035: Pathlib Dynamic Fstring Write

Constructing a file path dynamically from untrusted variables (e.g., f-strings) and then writing to it can lead to arbitrary file writes via path traversal if the variable isn't strictly validated or typed.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-4035-pathlib-dynamic-fstring-write --engine opengrep

Description

Constructing a file path dynamically from untrusted variables (e.g., f-strings) and then writing to it can lead to arbitrary file writes via path traversal if the variable isn't strictly validated or typed.