Skip to main content
Menu
Advisories

Denial of service via unbounded format Jinja filter width in TextFormatter (un-patched sibling of GHSA-ppw9)

GHSA-5238-WM28-5FVFPublished Updated GitHub

Description

The template renderer's format filter applied a format string with no bound on its width, so one template expression could make the backend build a single string of gigabytes. Any user who could author or run a workflow could exhaust the memory of the executor running it. Upgrade to v0.10.0 or later.

Impact

An authenticated user who could author or run a workflow, or supply an input to one, could trigger a single synchronous multi-gigabyte allocation that exhausted the executor worker's memory, degrading or denying execution for other users on a shared deployment. There was no confidentiality or integrity impact.

Fix

Fixed in AutoGPT Platform v0.10.0.

Templates now refuse a format width or precision above 1,000 characters before formatting, in the format filter, the % operator and str.format.

Fix: #16241.

Fix evidence: 0a1c060a39e8.

Upgrade to v0.10.0 or later. Version numbers in this advisory identify Platform releases, whose Git tags are autogpt-platform-beta-v<VERSION>, rather than the backend Python package version. The significantgravitas/autogpt Docker image is tagged v<VERSION>.

Workarounds

None.

---

Details

format_filter_for_jinja2 in autogpt_platform/backend/backend/util/text.py returned format_string % float(value) with no cap on the width or precision the format string asked for, and was registered as the template renderer's format filter. The fix for GHSA-ppw9-h7rv-gwq9 had bounded only the ** and * operators (through call_binop and MAX_EXPONENT), so the filter was a second route to the same exhaustion in the same file.

The render timeout (TEMPLATE_RENDER_TIMEOUT, 10 seconds) used asyncio.wait_for, which cannot interrupt a synchronous C call, so the allocation ran to completion on the shared executor's event loop. The filter was reachable from workflow-author-controlled format fields: FillTextTemplateBlock (autogpt_platform/backend/backend/blocks/text.py), AgentInputBlock and AgentOutputBlock (blocks/io.py), and LLM prompt formatting (blocks/llm.py). The reporter confirmed it on commit bfecefb75a.

Proof of concept

Validated in Docker (python:3.11-slim) importing the real backend/util/text.py unchanged.

  1. Control: {{ 5 | format('%.2f') }} renders fine → "5.00".
  2. Confirm lineage (the GHSA-ppw9 guard works for operators): {{ 999999999 ** 999999999 }} and the * variants raise OverflowError — blocked by the MAX_EXPONENT call_binop guard.
  3. The sibling vector is NOT blocked: rendering {{ 0 | format('%200000000f') }} inside a 512 MB container OOM-killed the process (exit 137); the 10s render timeout never fired because the % allocation is a synchronous C call. {{ 0 | format('%300000000f') }} produced a ~300,000,000-character string / ~1.17 GB RSS under a 4 GB cap in ~1.1s — demonstrating unbounded output with no guard.

Any graph that exposes a format field (FillTextTemplateBlock, AgentInput/AgentOutputBlock, or LLM prompt formatting) lets a low-privilege graph author trigger this; multiple expressions can be chained to multiply the allocation.

References

Timeline

Reported 2026-10-08 · Triaged 2026-10-09 · Fixed 2026-10-26 · Published 2026-11-17.

References

GitHub · Significant-Gravitas/AutoGPT