CVE-2025-1040 Server-Side Template Injection (SSTI) in significant-gravitas/autogpt

High 8.8 Published Updated

Attackers can execute arbitrary code on the host system via Server-Side Template Injection in AutoGPT's output block handling.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-1040?

CVE-2025-1040 is a high-severity code injection vulnerability in significant-gravitas/autogpt, published on 20 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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 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.

Weakness: CWE-1336

Which versions are affected by CVE-2025-1040?

It affects 1 product.

Products include Agpt Autogpt Platform.

How do I fix CVE-2025-1040?

No fix has been published for CVE-2025-1040 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-1040 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1040 exists.

Sources

Also known as GHSA-cjjc-mf84-xp9f.

Is CVE-2025-1040 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free