π‘οΈ Sentinel: [CRITICAL] Fix Remote Code Execution in PDF Compilation#316
π‘οΈ Sentinel: [CRITICAL] Fix Remote Code Execution in PDF Compilation#316anchapin wants to merge 1 commit into
Conversation
- Added `-no-shell-escape` flag to `pdflatex` compilation calls - Added `--pdf-engine-opt=-no-shell-escape` flag to `pandoc` compilation calls - Added timeout constraints (30s for compilation, 10s for availability checks) - Added proper process cleanup for `TimeoutExpired` exceptions to avoid zombie processes Co-authored-by: anchapin <6326294+anchapin@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: CRITICAL
π‘ Vulnerability: Untrusted LaTeX compilation commands (
pdflatexandpandocusingxelatex) were executed without the-no-shell-escapeflag, which allows malicious LaTeX documents to execute arbitrary system commands (RCE).π― Impact: Remote Code Execution (RCE) and Denial of Service (DoS) via infinite compilation loops.
π§ Fix: Enforced
-no-shell-escapeflags forpdflatexandpandoc, and wrapped allsubprocess.Popen().communicate()calls with timeouts and process cleanup.β Verification: Ran
pytest tests/test_pdf_security.pyand the full test suite to ensure the flags are present and timeouts behave correctly without regressions.PR created automatically by Jules for task 12386825772875980417 started by @anchapin