CVE-2026-66897: Go Os Root Unconfined Filesystem Escape

Filesystem operations should be performed using `os.Root` methods (e.g., `OpenFile`, `Create`) rather than joining `root.Name()` with paths and passing them to unconfined `os` package functions. Operating on raw paths bypasses directory confinement and allows path traversal or symlink escapes.

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-66897-go-os-root-unconfined-filesystem-escape --engine opengrep

Description

Filesystem operations should be performed using `os.Root` methods (e.g., `OpenFile`, `Create`) rather than joining `root.Name()` with paths and passing them to unconfined `os` package functions. Operating on raw paths bypasses directory confinement and allows path traversal or symlink escapes.