{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1040 exists.","fix":"No fix has been published for CVE-2025-1040 yet. Limit exposure of the affected software until one is available.","what":"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."},"fix_prompt":"Check this codebase for CVE-2025-1040 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1040 exists.\n\nAffected product: significant-gravitas/autogpt. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-1040/ (Markdown: https://insights.sbomify.com/CVE-2025-1040/index.md)","id":"CVE-2025-1040","markdown":"https://insights.sbomify.com/CVE-2025-1040/index.md","name":"CVE-2025-1040","record":{"aliases":["GHSA-cjjc-mf84-xp9f"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"AutoGPT AI agent","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code on the host system via Server-Side Template Injection in AutoGPT's output block handling.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"autogpt_platform","vendor":"agpt"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":false,"headline":"Server-Side Template Injection (SSTI) in significant-gravitas/autogpt","id":"CVE-2025-1040","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":0,"n_references":2,"next":{"headline":"Avaya Call Management System RCE vulnerability","id":"CVE-2025-1041"},"packages":[],"prev":{"headline":"Lenix Elementor Leads addon \u003c= 1.8.2 - Unauthenticated Stored Cross-Site Scripting via URL Form Field","id":"CVE-2025-1039"},"products":["significant-gravitas/autogpt"],"published":"2025-03-20","related":[{"cvss_score":9.4,"headline":"AutoGPT Affected by Remote Code Execution via Dynamic Module Import in Block Loading (__import__)","id":"CVE-2026-26020","kev_date_added":null,"published":"2026-02-12"},{"cvss_score":9.3,"headline":"AutoGPT has SSRF vulnerability in ReadRSSFeedBlock","id":"CVE-2025-62615","kev_date_added":null,"published":"2026-02-04"},{"cvss_score":9.3,"headline":"AutoGPT has SSRF vulnerability in SendDiscordFileBlock","id":"CVE-2025-62616","kev_date_added":null,"published":"2026-02-04"},{"cvss_score":8.7,"headline":"AutoGPT has a DoS vulnerability in ReadRSSFeedBlock","id":"CVE-2025-32393","kev_date_added":null,"published":"2026-02-05"},{"cvss_score":8.6,"headline":"AutoGPT is Vulnerable to RCE via Disabled Block Execution","id":"CVE-2026-24780","kev_date_added":null,"published":"2026-01-29"},{"cvss_score":8.6,"headline":"AutoGPT allows leakage of cross-domain cookies and protected headers in requests redirect","id":"CVE-2025-31491","kev_date_added":null,"published":"2025-04-14"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-15","vendors":["significant-gravitas"]},"summary":"Attackers can execute arbitrary code on the host system via Server-Side Template Injection in AutoGPT's output block handling.","url":"https://insights.sbomify.com/CVE-2025-1040/"}