What’s Vulnerable › Vulnerabilities
CVE-2024-1881: Improper Neutralization of Special Elements used in an OS Command in significant-gravitas/autogpt
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-06-06 · updated 2026-06-17
- Weakness: CWE-78
Description
AutoGPT, a component of significant-gravitas/autogpt, is vulnerable to an improper neutralization of special elements used in an OS command ('OS Command Injection') due to a flaw in its shell command validation function. Specifically, the vulnerability exists in versions v0.5.0 up to but not including 5.1.0. The issue arises from the application's method of validating shell commands against an allowlist or denylist, where it only checks the first word of the command. This allows an attacker to bypass the intended restrictions by crafting commands that are executed despite not being on the allowlist or by including malicious commands not present in the denylist. Successful exploitation of this vulnerability could allow an attacker to execute arbitrary shell commands.
Affected products
- Agpt Autogpt Classic: from 0.5.0 before 0.5.1 — fixed in 0.5.1
How to fix
Upgrade to a fixed version: Agpt Autogpt Classic 0.5.1. Check the vendor advisory for mitigations.
References
- https://github.com/significant-gravitas/autogpt/commit/26324f29849967fa72c207da929af612f1740669
- https://huntr.com/bounties/416c4a8b-36ba-4bbc-850a-a2f978b0fac8
- https://github.com/significant-gravitas/autogpt/commit/26324f29849967fa72c207da929af612f1740669
- https://huntr.com/bounties/416c4a8b-36ba-4bbc-850a-a2f978b0fac8
Get alerted when CVE-2024-1881 or the next vulnerability affects your stack