# CVE-2024-1881: Improper Neutralization of Special Elements used in an OS Command in significant-gravitas/autogpt

- Severity: High 8.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.43%, higher than 73% of CVEs (2026-12-01)
- Published: 2024-06-06T18:19:08.151Z
- Modified: 2026-06-17T07:05:12.597Z
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: @huntr_ai

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

(As written by CVE List.)

## Affected

- significant-gravitas significant-gravitas/autogpt: from unspecified before 5.1.0
- significant-gravitas autogpt: from 0.5.0 before 5.1.0
- agpt autogpt_classic: from 0.5.0 before 0.5.1

## Every score

- @huntr_ai: CVSS:3.0 8.8 High `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://huntr.com/bounties/416c4a8b-36ba-4bbc-850a-a2f978b0fac8> (third-party-advisory)
- <https://github.com/significant-gravitas/autogpt/commit/26324f29849967fa72c207da929af612f1740669> (patch)

## Sources

- CVE List: [CVE-2024-1881](https://www.cve.org/CVERecord?id=CVE-2024-1881), CVE Terms of Use, modified 2024-08-01
- NVD: [CVE-2024-1881](https://nvd.nist.gov/vuln/detail/CVE-2024-1881), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-1881 · Whole record: https://cve.day/CVE-2024-1881.json · Rebuilt by cve.day 2026-11-25T22:58:41.498Z
