Skip to content

fix(file sink): OBE-10715 confine templated path to a base directory - #158

Open
jsbalis1 wants to merge 1 commit into
masterfrom
OBE-10715__confine_file_sink_template_path
Open

fix(file sink): OBE-10715 confine templated path to a base directory#158
jsbalis1 wants to merge 1 commit into
masterfrom
OBE-10715__confine_file_sink_template_path

Conversation

@jsbalis1

@jsbalis1 jsbalis1 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

An attacker-controlled event field referenced by the file sink's path template could inject ../ sequences and write to arbitrary filesystem locations outside the intended log directory (CVSS 8.1).

Confine rendered paths to a base directory derived from the template's literal prefix (or an explicit base_dir override) before any filesystem operation, rejecting and dropping events whose rendered path would escape it. dangerously_allow_unconfined_template_resolution opts back out for operators who fully trust every field the template references.

An attacker-controlled event field referenced by the `file` sink's
`path` template could inject `../` sequences and write to arbitrary
filesystem locations outside the intended log directory (CVSS 8.1).

Confine rendered paths to a base directory derived from the
template's literal prefix (or an explicit `base_dir` override) before
any filesystem operation, rejecting and dropping events whose
rendered path would escape it. `dangerously_allow_unconfined_template_resolution`
opts back out for operators who fully trust every field the template
references.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants