Skip to content

Commit 0774895

Browse files
1 parent a1dc99a commit 0774895

7 files changed

Lines changed: 423 additions & 40 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-766v-q9x3-g744",
4+
"modified": "2026-04-08T19:21:32Z",
5+
"published": "2026-04-08T19:21:32Z",
6+
"aliases": [],
7+
"summary": "PraisonAI has Memory State Leakage and Path Traversal in MultiAgent Context Handling",
8+
"details": "## Summary\nThe `MultiAgentLedger` and `MultiAgentMonitor` components in the provided code exhibit vulnerabilities that can lead to context leakage and arbitrary file operations. Specifically:\n1. **Memory State Leakage via Agent ID Collision**: The `MultiAgentLedger` uses a dictionary to store ledgers by agent ID without enforcing uniqueness. This allows agents with the same ID to share ledger instances, leading to potential leakage of sensitive context data.\n2. **Path Traversal in MultiAgentMonitor**: The `MultiAgentMonitor` constructs file paths by concatenating the `base_path` and agent ID without sanitization. This allows an attacker to escape the intended directory using path traversal sequences (e.g., `../`), potentially leading to arbitrary file read/write.\n\n## Details\n### Vulnerability 1: Memory State Leakage\n- **File**: `examples/context/12_multi_agent_context.py:68`\n- **Description**: The `MultiAgentLedger` class uses a dictionary (`self.ledgers`) to store ledger instances keyed by agent ID. The `get_agent_ledger` method creates a new ledger only if the agent ID is not present. If two agents are registered with the same ID, they will share the same ledger instance. This violates the isolation policy and can lead to leakage of sensitive context data (system prompts, conversation history) between agents.\n- **Exploitability**: An attacker can register an agent with the same ID as a victim agent to gain access to their ledger. This is particularly dangerous in multi-tenant systems where agents may handle sensitive user data.\n\n### Vulnerability 2: Path Traversal\n- **File**: `examples/context/12_multi_agent_context.py:106`\n- **Description**: The `MultiAgentMonitor` class constructs file paths for agent monitors by directly concatenating the `base_path` and agent ID. Since the agent ID is not sanitized, an attacker can provide an ID containing path traversal sequences (e.g., `../../malicious`). This can result in files being created or read outside the intended directory (`base_path`).\n- **Exploitability**: An attacker can create an agent with a malicious ID (e.g., `../../etc/passwd`) to write or read arbitrary files on the system, potentially leading to information disclosure or file corruption.\n\n## PoC\n### Memory State Leakage\n```python\nmulti_ledger = MultiAgentLedger()\n\n# Victim agent (user1) registers and tracks sensitive data\nvictim_ledger = multi_ledger.get_agent_ledger('user1_agent')\nvictim_ledger.track_system_prompt(\"Sensitive system prompt\")\nvictim_ledger.track_history([{\"role\": \"user\", \"content\": \"Secret data\"}])\n\n# Attacker registers with the same ID\nattacker_ledger = multi_ledger.get_agent_ledger('user1_agent')\n\n# Attacker now has access to victim's ledger\nprint(attacker_ledger.get_ledger().system_prompt) # Outputs: \"Sensitive system prompt\"\nprint(attacker_ledger.get_ledger().history) # Outputs: [{'role': 'user', 'content': 'Secret data'}]\n```\n\n### Path Traversal\n```python\nwith tempfile.TemporaryDirectory() as tmpdir:\n multi_monitor = MultiAgentMonitor(base_path=tmpdir)\n \n # Create agent with malicious ID\n malicious_id = '../../malicious'\n monitor = multi_monitor.get_agent_monitor(malicious_id)\n \n # The monitor file is created outside the intended base_path\n # Example: if tmpdir is '/tmp/safe_dir', the actual path might be '/tmp/malicious'\n print(monitor.path) # Outputs: '/tmp/malicious' (or equivalent)\n```\n\n## Impact\n- **Memory State Leakage**: This vulnerability can lead to unauthorized access to sensitive agent context, including system prompts and conversation history. In a multi-tenant system, this could result in cross-user data leakage.\n- **Path Traversal**: An attacker can read or write arbitrary files on the system, potentially leading to information disclosure, denial of service (by overwriting critical files), or remote code execution (if executable files are overwritten).\n\n## Recommended Fix\n### For Memory State Leakage\n- Enforce unique agent IDs at the application level. If the application expects unique IDs, add a check during agent registration to prevent duplicates.\n- Alternatively, modify the `MultiAgentLedger` to throw an exception if an existing agent ID is reused (unless explicitly allowed).\n\n### For Path Traversal\n- Sanitize agent IDs before using them in file paths. Replace any non-alphanumeric characters (except safe ones like underscores) or remove path traversal sequences.\n- Use `os.path.join` and `os.path.realpath` to resolve paths, then check that the resolved path starts with the intended base directory.\n\nExample fix for `MultiAgentMonitor`:\n```python\nimport os\n\ndef get_agent_monitor(self, agent_id: str):\n # Sanitize agent_id to remove path traversal\n safe_id = os.path.basename(agent_id.replace('../', '').replace('..\\\\', ''))\n # Alternatively, use a strict allow-list of characters\n \n # Construct path and ensure it's within base_path\n agent_path = os.path.join(self.base_path, safe_id)\n real_path = os.path.realpath(agent_path)\n real_base = os.path.realpath(self.base_path)\n \n if not real_path.startswith(real_base):\n raise ValueError(f\"Invalid agent ID: {agent_id}\")\n \n ...\n```\nAdditionally, consider using a dedicated function for sanitizing filenames.",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "PyPI",
19+
"name": "praisonaiagents"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "1.5.115"
30+
}
31+
]
32+
}
33+
],
34+
"database_specific": {
35+
"last_known_affected_version_range": "<= 1.5.114"
36+
}
37+
}
38+
],
39+
"references": [
40+
{
41+
"type": "WEB",
42+
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-766v-q9x3-g744"
43+
},
44+
{
45+
"type": "PACKAGE",
46+
"url": "https://github.com/MervinPraison/PraisonAI"
47+
}
48+
],
49+
"database_specific": {
50+
"cwe_ids": [
51+
"CWE-22",
52+
"CWE-668"
53+
],
54+
"severity": "MODERATE",
55+
"github_reviewed": true,
56+
"github_reviewed_at": "2026-04-08T19:21:32Z",
57+
"nvd_published_at": null
58+
}
59+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-f292-66h9-fpmf",
4+
"modified": "2026-04-08T19:21:14Z",
5+
"published": "2026-04-08T19:21:14Z",
6+
"aliases": [
7+
"CVE-2026-39889"
8+
],
9+
"summary": "PraisonAI Has Unauthenticated SSE Event Stream that Exposes All Agent Activity in A2U Server",
10+
"details": "The A2U (Agent-to-User) event stream server in PraisonAI exposes all agent activity without authentication. This is a separate component from the gateway server fixed in CVE-2026-34952.\n\nThe create_a2u_routes() function registers the following endpoints with NO authentication checks:\n- GET /a2u/info — exposes server info and stream names\n- POST /a2u/subscribe — creates event stream subscription\n- GET /a2u/events/{stream_name} — streams ALL agent events\n- GET /a2u/events/sub/{id} — streams events for subscription\n- GET /a2u/health — health check\n\n\nAn unauthenticated attacker can:\n1. POST /a2u/subscribe → receive subscription_id\n2. GET /a2u/events/sub/{subscription_id} → receive live SSE stream \n of all agent events including responses, tool calls, and thinking\n\nThis exposes sensitive agent activity including responses, internal reasoning, and tool call arguments to any network attacker.\n\n<img width=\"1512\" height=\"947\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3438f3ea-75ec-4978-9dd9-d9a6da42c248\" />\n\n<img width=\"1512\" height=\"571\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ee3313f6-f522-48f7-9c06-e5e265c6aeb4\" />\n\n\n[1] POST /a2u/subscribe (no auth token)\n Status: 200\n Response: {\"subscription_id\":\"sub-a1ad8a6edd8b\",\"stream_name\":\"events\",\n \"stream_url\":\"http://testserver/a2u/events/sub-a1ad8a6edd8b\"}\n Got subscription_id: sub-a1ad8a6edd8b\n\n[2] GET /a2u/info (no auth token)\n Status: 200\n Response: {\"name\":\"A2U Event Stream\",\"version\":\"1.0.0\",\n \"streams\":[\"events\"],\"event_types\":[\"agent.started\",\"agent.thinking\",\n \"agent.tool_call\",\"agent.response\",\"agent.completed\",\"agent.error\"]}\n\n[3] GET /a2u/health (no auth token) \n Status: 200\n Response: {\"status\":\"healthy\",\"active_subscriptions\":1,\"active_streams\":1}\n\n\nImpact: Attacker can subscribe and receive ALL agent events including responses, tool calls, and internal reasoning in real-time",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "praisonai"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "4.5.115"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 4.5.114"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-f292-66h9-fpmf"
45+
},
46+
{
47+
"type": "PACKAGE",
48+
"url": "https://github.com/MervinPraison/PraisonAI"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.115"
53+
}
54+
],
55+
"database_specific": {
56+
"cwe_ids": [
57+
"CWE-200"
58+
],
59+
"severity": "HIGH",
60+
"github_reviewed": true,
61+
"github_reviewed_at": "2026-04-08T19:21:14Z",
62+
"nvd_published_at": null
63+
}
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-hfvc-g4fc-pqhx",
4+
"modified": "2026-04-08T19:22:12Z",
5+
"published": "2026-04-08T19:22:12Z",
6+
"aliases": [
7+
"CVE-2026-39883"
8+
],
9+
"summary": "opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking",
10+
"details": "## Summary\n\nThe fix for GHSA-9h8m-3fm2-qjrq (CVE-2026-24051) changed the Darwin `ioreg` command to use an absolute path but left the BSD `kenv` command using a bare name, allowing the same PATH hijacking attack on BSD and Solaris platforms.\n\n## Root Cause\n\n`sdk/resource/host_id.go` line 42:\n\n if result, err := r.execCommand(\"kenv\", \"-q\", \"smbios.system.uuid\"); err == nil {\n\nCompare with the fixed Darwin path at line 58:\n\n result, err := r.execCommand(\"/usr/sbin/ioreg\", \"-rd1\", \"-c\", \"IOPlatformExpertDevice\")\n\nThe `execCommand` helper at `sdk/resource/host_id_exec.go` uses `exec.Command(name, arg...)` which searches `$PATH` when the command name contains no path separator.\n\nAffected platforms (per build tag in `host_id_bsd.go:4`): DragonFly BSD, FreeBSD, NetBSD, OpenBSD, Solaris.\n\nThe `kenv` path is reached when `/etc/hostid` does not exist (line 38-40), which is common on FreeBSD systems.\n\n## Attack\n\n1. Attacker has local access to a system running a Go application that imports `go.opentelemetry.io/otel/sdk`\n2. Attacker places a malicious `kenv` binary earlier in `$PATH`\n3. Application initializes OpenTelemetry resource detection at startup\n4. `hostIDReaderBSD.read()` calls `exec.Command(\"kenv\", ...)` which resolves to the malicious binary\n5. Arbitrary code executes in the context of the application\n\nSame attack vector and impact as CVE-2026-24051.\n\n## Suggested Fix\n\nUse the absolute path:\n\n if result, err := r.execCommand(\"/bin/kenv\", \"-q\", \"smbios.system.uuid\"); err == nil {\n\nOn FreeBSD, `kenv` is located at `/bin/kenv`.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "go.opentelemetry.io/otel/sdk"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "1.15.0"
29+
},
30+
{
31+
"fixed": "1.43.0"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 1.42.0"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-hfvc-g4fc-pqhx"
45+
},
46+
{
47+
"type": "PACKAGE",
48+
"url": "https://github.com/open-telemetry/opentelemetry-go"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "http://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.43.0"
53+
}
54+
],
55+
"database_specific": {
56+
"cwe_ids": [
57+
"CWE-426"
58+
],
59+
"severity": "HIGH",
60+
"github_reviewed": true,
61+
"github_reviewed_at": "2026-04-08T19:22:12Z",
62+
"nvd_published_at": null
63+
}
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-hwg5-x759-7wjg",
4+
"modified": "2026-04-08T19:21:22Z",
5+
"published": "2026-04-08T19:21:22Z",
6+
"aliases": [
7+
"CVE-2026-39891"
8+
],
9+
"summary": "PraisonAI has Template Injection in Agent Tool Definitions",
10+
"details": "## Summary\nDirect insertion of unescaped user input into template-rendering tools allows arbitrary code execution via specially crafted agent instructions.\n## Details\nThe `create_agent_centric_tools()` function returns tools (like `acp_create_file`) that process file content using template rendering. When user input from `agent.start()` is passed directly into these tools without escaping (as shown in `agent_centric_example.py:85-86`), template expressions in the input are executed rather than treated as literal text. This occurs because:\n1. No input sanitization or escaping is applied to user-controlled content\n2. The ACP-enabled runtime auto-approves operations (`approval_mode=\"auto\"`)\n3. Tools lack context-aware escaping for template syntax\n## PoC\n```python\n# Replace the agent.start() call at line 85 with:\nresult = agent.start('Create file with content: {{ self.__init__.__globals__.__builtins__.__import__(\"os\").system(\"touch /tmp/pwned\") }}')\n```\nSuccessful exploitation creates `/tmp/pwned` confirming arbitrary command execution. The expression `{{7*7}}` renders as `49` instead of literal text.\n## Impact\nAttackers can execute arbitrary system commands with the privileges of the running process by injecting malicious template expressions through agent instructions. This compromises the host system, enabling data theft, ransomware deployment, or lateral movement.\n## Recommended Fix\n1. **Input Sanitization**: Implement strict whitelist validation for file content\n2. **Contextual Escaping**: Auto-escape template syntax characters (e.g., `{{ }}`) in user input using Jinja2 `autoescape=True`\n3. **Sandboxing**: Restrict template execution environments using secure eval modes\n4. **Approval Hardening**: Require manual approval for file creation operations in production",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "praisonai"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "4.5.115"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 4.5.114"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-hwg5-x759-7wjg"
45+
},
46+
{
47+
"type": "PACKAGE",
48+
"url": "https://github.com/MervinPraison/PraisonAI"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.115"
53+
}
54+
],
55+
"database_specific": {
56+
"cwe_ids": [
57+
"CWE-94"
58+
],
59+
"severity": "HIGH",
60+
"github_reviewed": true,
61+
"github_reviewed_at": "2026-04-08T19:21:22Z",
62+
"nvd_published_at": null
63+
}
64+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-qxpc-96fq-wwmg",
4+
"modified": "2026-04-08T19:22:39Z",
5+
"published": "2026-04-07T18:31:37Z",
6+
"aliases": [
7+
"CVE-2026-27314"
8+
],
9+
"summary": "Apache Cassandra is vulnerable to privilege escalation in an mTLS environment using MutualTlsAuthenticator",
10+
"details": "Privilege escalation in Apache Cassandra 5.0 on an mTLS environment using MutualTlsAuthenticator allows a user with only CREATE permission to associate their own certificate identity with an arbitrary role, including a superuser role, and authenticate as that role via ADD IDENTITY.\n\nUsers are recommended to upgrade to version 5.0.7+, which fixes this issue.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Maven",
21+
"name": "org.apache.cassandra:cassandra-all"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "5.0-alpha1"
29+
},
30+
{
31+
"fixed": "5.0.7"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "ADVISORY",
41+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27314"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/apache/cassandra/commit/b584a435970e5125e1def5148d943c39569dc7af"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/apache/cassandra"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/apache/cassandra/releases/tag/cassandra-5.0.7"
54+
},
55+
{
56+
"type": "WEB",
57+
"url": "https://lists.apache.org/thread/zrng82ddy4rpsmfyk582v6hqxcqrbz7f"
58+
},
59+
{
60+
"type": "WEB",
61+
"url": "http://www.openwall.com/lists/oss-security/2026/04/07/7"
62+
}
63+
],
64+
"database_specific": {
65+
"cwe_ids": [
66+
"CWE-267"
67+
],
68+
"severity": "HIGH",
69+
"github_reviewed": true,
70+
"github_reviewed_at": "2026-04-08T19:22:39Z",
71+
"nvd_published_at": "2026-04-07T17:16:27Z"
72+
}
73+
}

0 commit comments

Comments
 (0)