What happened
The TaskFlow and common.ai decorators re-render the returned (templated) field a second time after the task runner has already substituted values, re-interpreting already-substituted content as Jinja. The fix renders only the returned value and merges bound call arguments into the context.
Why it matters
Airflow is a core ML/agent-orchestration tool, and the common.ai @task.llm/@task.agent decorators are the AI-native surface. Double-rendering creates a template-injection/possible code-execution path in DAGs where an input value can be made to contain Jinja syntax.
Attack vector
These decorators call render_template_fields() inside execute(), which renders every other template field a second time after the task runner has already rendered them, so a value already substituted into the template can be re-interpreted as Jinja syntax — a template-injection risk.
Affected systems
Apache Airflow (decorators that build their main field from the function's return value) prior to the fix merged in PR #76244
Mitigation
Upgrade to the Apache Airflow release containing the fix (PR #76244, which renders only the returned value); document how to reference function arguments in the returned prompt rather than an f-string.