You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security(windows): elevated sandbox ACL setup has a path replacement race #728
Elevated Windows sandbox setup inspects and modifies ACL targets through separate pathname operations without binding those operations to a no-follow handle or stable file identity.
A lower-privileged process able to rename or replace a user-controlled workspace/ACL target with a junction during setup may redirect inherited capability-SID ACLs onto an unintended directory.
internal/sandbox/windows_runner.go:573-607 places the capability SID in later restricted tokens.
Race outline
Begin elevated sandbox setup for a path the invoking user can rename or replace.
Between pathname validation and ACL mutation, replace a path component or target with a junction/reparse point.
The elevated helper reopens the pathname and may apply the capability ACL to the replacement target.
Later restricted sandbox tokens containing that SID may receive unintended access.
Impact
If the race is achievable against a privileged target, this can become a local privilege-escalation primitive by granting the sandbox capability SID inherited access to a directory selected through path replacement.
This finding was established by static review and still needs a focused Windows reproduction across the actual privilege boundary.
Suggested fix
Open targets without following reparse points.
Reject unexpected reparse tags in user-controlled path components.
Retain handles/file IDs across security-descriptor read and write.
Verify object identity immediately before mutation and rollback.
Add a Windows integration test that attempts target replacement during elevated setup.
Activity
fix(sandbox): bind Windows elevated ACL setup to one no-follow handle (…