Improper Neutralization of Special Elements used in an OS Command in significant-gravitas/autogpt
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-1881
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 15:38 UTC · Revision 1
Source evidence
Improper Neutralization of Special Elements used in an OS Command in significant-gravitas/autogpt
core-osv · Original sourcePublished 6 Jun 2024, 18:19 UTC
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.
osv:CVE-2024-1881
Complete source record
{
"id": "11342d3683e731f4e64160905e5a17221243eeeedf7103d63bbbb2b9491f63c2",
"url": "https://osv.dev/vulnerability/CVE-2024-1881",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Improper Neutralization of Special Elements used in an OS Command in significant-gravitas/autogpt",
"summary": "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.",
"evidence": "osv:CVE-2024-1881",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2024-1881",
"aliases": [
"CVE-2024-1881"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/significant-gravitas/autogpt",
"type": "GIT",
"events": [
{
"introduced": "af3ebdf6af1704e42254ad07791bf7e1642c43d3"
},
{
"fixed": "26324f29849967fa72c207da929af612f1740669"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"fixed": "26324f29849967fa72c207da929af612f1740669"
}
],
"source": "REFERENCES_COMMIT"
},
{
"cpe": "cpe:2.3:a:agpt:autogpt_classic:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0.5.0"
},
{
"fixed": "0.5.1"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"autogpt-v0.5.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-1881.json"
}
}
],
"modified": "2026-10-28T02:30:37.210161565Z",
"provider": "osv",
"references": [
"https://huntr.com/bounties/416c4a8b-36ba-4bbc-850a-a2f978b0fac8",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1881.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-1881",
"https://github.com/significant-gravitas/autogpt/commit/26324f29849967fa72c207da929af612f1740669"
],
"provider_metadata": {
"cwe_ids": [
"CWE-78"
],
"cna_assigner": "@huntr_ai",
"unresolved_ranges": [
{
"extracted_events": [
{
"range": [
{
"fixed": "5.1.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "SplitRange"
}
]
}
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1881.json"
}
},
"related_cves": [
{
"value": "CVE-2024-1881",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504198,
"published_at": "2024-06-06T18:19:08.151+00:00"
}