Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/exec: LookPath considers paths containing ":" to be absolute on windows #71469

Open
rolandshoemaker opened this issue Jan 28, 2025 · 0 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows Security

Comments

@rolandshoemaker
Copy link
Member

os/exec.LookPath considers all paths containing : to be absolute, as one use of the colon is to indicate drive letters. Unfortunately it is also used for "alternate data streams" on NTFS filesystems, which allow attaching additional data to a file, accessed using a special suffix.

This can result in LookPath returning a file (with a ADS) in the current directory unexpectedly.

This is a PUBLIC track security issue per our security policy.

Thanks to Juho Forsén for reporting this issue.

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows Security
Projects
None yet
Development

No branches or pull requests

2 participants