Conversation
… path checks (#48863) The IsPathIn function was allowing access to the immediate parent directory because filepath.Rel returns ".." which does not start with the prefix "../" (Unix) or "..\" (Windows). This change adds an explicit check to ensure the relative path is not exactly ".." before checking for the prefix. This fix prevents a configuration where the log path could be set to the parent directory of the allowed root. While this corrects the validation logic, the impact is minor because attempting to create a log file where a directory already exists would fail with an error (e.g. EISDIR / "is a directory"). Also extend the input path checks to after logging path template expansion. The current checks look at the path templates, add an extra check immediately after expanding the template to ensure that no placeholder replacement has evaded the config check. (cherry picked from commit 8de6b1f) # Conflicts: # x-pack/filebeat/input/cel/input.go
Contributor
Author
|
Cherry-pick of 8de6b1f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
efd6
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
This is an automatic backport of pull request #48863 done by [Mergify](https://mergify.com).