Skip to content

docs: explain how to render untrusted templates with a sandboxed environment - #670

Open
cvas22 wants to merge 1 commit into
elapouya:masterfrom
cvas22:docs/untrusted-templates-sandbox
Open

cvas22 wants to merge 1 commit into
elapouya:masterfrom
cvas22:docs/untrusted-templates-sandbox

Conversation

@cvas22

@cvas22 cvas22 commented Nov 8, 2026

Copy link
Copy Markdown

Refs #549 and #632.

Both issues report that a docx template can run arbitrary Python through jinja. Passing a SandboxedEnvironment to render() already blocks that (the payload from #549 raises a SecurityError), but the docs never say so. This adds a short "Untrusted templates" section next to the custom filters one.

Notes

Docs only, no behavior change. Whether the default environment should become sandboxed is a separate decision for the maintainers, so I didn't touch it here.

…ronment

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant