Skip to content

cve: fix sandbox path bypass in file helper through symlink attack - #2143

Merged
sreeram77 merged 1 commit into
mainfrom
sreeram77/cve-fix
Apr 13, 2026
Merged

sreeram77 merged 1 commit into
mainfrom
sreeram77/cve-fix

Conversation

@sreeram77

Copy link
Copy Markdown
Contributor

The file template helper enforces sandbox_path during template evaluation, but the later dependency fetch reads the original raw path without re-checking the sandbox. This creates a time-of-check to time-of-use gap. If an attacker can retarget a symlink or equivalent link target after validation but before dependency fetch, consul-template can read an out-of-sandbox file and then render the cached contents even after the link is restored to an in-sandbox target.

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@sreeram77
sreeram77 requested review from a team as code owners April 9, 2026 11:40

@anilvpatel anilvpatel left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sreeram77
sreeram77 merged commit 08d8f94 into main Apr 13, 2026
57 of 60 checks passed
@sreeram77
sreeram77 deleted the sreeram77/cve-fix branch April 13, 2026 10:01
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

⌂ 换网址