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: path validation bypass via relative paths in write-commands.ts #707
Hey — found this during a code review on our project where we vendor gstack.
File:browse/src/write-commands.ts:303
The path validation does strict boundary checks for absolute paths but falls back to a simple includes('..') for relative paths. That's easy to bypass.
Cleaner approach — always resolve first, then check:
constresolved=path.resolve(filePath);constsafeDirs=[TEMP_DIR,process.cwd()];if(!safeDirs.some(dir=>isPathWithin(resolved,dir))){thrownewError("Path must be within: "+safeDirs.join(", "));}
Activity
fix(security): add symlink resolution to meta-commands validateOutput…
Fix path validation bypass in cookie-import and hardcoded /tmp
garrytan commentedon Apr 9, 2026
Addressed by #852
fix(security): cookie-import path validation bypass + hardcoded /tmp
fix: security wave 3 — 12 fixes, 7 contributors (v0.16.4.0) (#988)
fix: security wave 3 — 12 fixes, 7 contributors (v0.16.4.0) (garrytan…