Cyber Resilience

CVE-2025-1040

Agpt Autogpt Platform ≤ 0.4.0

Public PoC
Published
20 March 2025
Modified
15 October 2025
Patch / advisory
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.016 73th percentile
Risk Priority 73 floored blend · peak EPSS

Summary

CVE-2025-1040 is a high-severity Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336) vulnerability in Agpt Autogpt Platform. Its CVSS base score is 8.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Template Injection (T1221); ranked in the top 27% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as AI Agent Protocols and Integrations; in the Supply Chain and Deployment risk domain.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

AutoGPT versions 0.3.4 and earlier contain a server-side template injection vulnerability in the AgentOutputBlock component that allows remote code execution. The flaw stems from unsafe handling of user-supplied format strings that are passed directly to the Jinja2 templating engine without proper sanitization or sandboxing, enabling arbitrary command execution on the underlying host. The issue is tracked under CWE-1336 and carries a CVSS 3.1 score of 8.8.

An authenticated attacker with network access can supply a malicious format string to trigger the injection and obtain code execution privileges equivalent to the AutoGPT process. Successful exploitation grants full control over the host system, including the ability to read, modify, or delete data and potentially pivot to other resources.

The vulnerability is resolved in AutoGPT 0.4.0. The referenced commit on GitHub and the associated huntr.com bounty reports document the patch that addresses the unsafe template handling in AgentOutputBlock. The EPSS score has remained at 0.1160 with no material increase since disclosure.

EU & UK References

Vulnerability Data

AutoGPT versions 0.3.4 and earlier are vulnerable to a Server-Side Template Injection (SSTI) that could lead to Remote Code Execution (RCE). The vulnerability arises from the improper handling of user-supplied format strings in the `AgentOutputBlock` implementation, where malicious input is…

more

passed to the Jinja2 templating engine without adequate security measures. Attackers can exploit this flaw to execute arbitrary commands on the host system. The issue is fixed in version 0.4.0.

CWE(s)

AI Security AnalysisAI

AI Category
AI Agent Protocols and Integrations
Risk Domain
Supply Chain and Deployment
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: autogpt

Related Threats

MITRE ATT&CK Enterprise Techniques

T1221 Template Injection Stealth
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-32393Same product: Agpt Autogpt Platform
CVE-2025-53944Same product: Agpt Autogpt Platform
CVE-2025-62615Same product: Agpt Autogpt Platform
CVE-2025-31491Same product: Agpt Autogpt Platform
CVE-2025-0454Same product: Agpt Autogpt Platform
CVE-2025-32425Same product: Agpt Autogpt Platform
CVE-2025-31490Same product: Agpt Autogpt Platform
CVE-2026-22038Same product: Agpt Autogpt Platform
CVE-2025-22603Same product: Agpt Autogpt Platform
CVE-2026-24780Same product: Agpt Autogpt Platform

Affected Assets

agpt
autogpt platform
≤ 0.4.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.2
  • V1.3.7
  • V1.3.10

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and static analysis can discover missing neutralization of template directives.

Input validation rejects or sanitizes untrusted data before it reaches the template engine, stopping injection of special syntax.

Security engineering principles require use of safe templating APIs and proper escaping of external input.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require proper input neutralization in template engines to prevent injection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect template-injection flaws but does not itself implement neutralization controls.

prevents

Secure development life cycle mandates input validation and sanitization that directly prevents template-injection weaknesses.

prevents

Application security requirements explicitly call for neutralizing special elements in template engines.

prevents

Secure architecture principles reduce the likelihood of unsafe template processing but do not prescribe specific neutralization techniques.

prevents

Secure coding standards require proper escaping or sandboxing of template directives, directly mitigating CWE-1336.

References