Question
Unintended file system access via \\input in TeX engines
Tasadduq BurneyownerOwner · Founder
22K reputation · 06 Nov 2021, 19:24 UTC
14.4K views0
Determine the conditions under which a TeX engine permits the \\input primitive to read files outside the intended directory, taking into account engine‑specific security primitives and default settings.
Behavior varies across pdfTeX, XeTeX, and LuaTeX; flags such as shell_escape, -no-shell-escape, and luaos.execute controls may enable or restrict access, and default configurations differ between TeX distributions.
- Does enabling pdfTeX's shell_escape flag allow \\input to read arbitrary paths such as /etc/passwd?
- Does XeTeX's -no-shell-escape option prevent \\input from accessing files outside the current working directory?
- How does LuaTeX's luaos.execute setting interact with the \\input primitive regarding file system access?