Common Weakness Enumeration

CWE-94

Allowed-with-Review

Improper Control of Generation of Code ('Code Injection')

Abstraction: Base · Status: Draft

The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

8808 vulnerabilities reference this CWE, most recent first.

GHSA-XJW9-4GW8-4RQX

Vulnerability from github – Published: 2026-02-19 19:34 – Updated: 2026-06-08 23:19
VLAI
Summary
Microsoft Semantic Kernel InMemoryVectorStore filter functionality vulnerable to remote code execution
Details

Impact:

An RCE vulnerability has been identified in Microsoft Semantic Kernel Python SDK, specifically within the InMemoryVectorStore filter functionality.

Patches:

The problem has been fixed in python-1.39.4. Users should upgrade this version or higher.

Workarounds:

Avoid using InMemoryVectorStore for production scenarios.

References:

Release python-1.39.4 · microsoft/semantic-kernel · GitHub PR to block use of dangerous attribute names that must not be accessed in filter expressions

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "semantic-kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.39.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-26030"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-02-19T19:34:14Z",
    "nvd_published_at": "2026-02-19T17:24:50Z",
    "severity": "CRITICAL"
  },
  "details": "### Impact:\nAn RCE vulnerability has been identified in Microsoft Semantic Kernel Python SDK, specifically within the `InMemoryVectorStore` filter functionality.\n\n### Patches:\nThe problem has been fixed in [python-1.39.4](https://github.com/microsoft/semantic-kernel/releases/tag/python-1.39.4). Users should upgrade this version or higher.\n\n### Workarounds:\nAvoid using `InMemoryVectorStore` for production scenarios.\n\n### References:\n[Release python-1.39.4 \u00b7 microsoft/semantic-kernel \u00b7 GitHub](https://github.com/microsoft/semantic-kernel/releases/tag/python-1.39.4)\n[PR to block use of dangerous attribute names that must not be accessed in filter expressions](https://github.com/microsoft/semantic-kernel/pull/13505)",
  "id": "GHSA-xjw9-4gw8-4rqx",
  "modified": "2026-06-08T23:19:39Z",
  "published": "2026-02-19T19:34:14Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/microsoft/semantic-kernel/security/advisories/GHSA-xjw9-4gw8-4rqx"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26030"
    },
    {
      "type": "WEB",
      "url": "https://github.com/microsoft/semantic-kernel/pull/13505"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/microsoft/semantic-kernel"
    },
    {
      "type": "WEB",
      "url": "https://github.com/microsoft/semantic-kernel/releases/tag/python-1.39.4"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pypa/advisory-database/tree/main/vulns/semantic-kernel/PYSEC-2026-163.yaml"
    }
  ],
  "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": "Microsoft Semantic Kernel InMemoryVectorStore filter functionality vulnerable to remote code execution"
}

GHSA-XJX3-C2F9-8M6P

Vulnerability from github – Published: 2024-04-03 12:31 – Updated: 2024-06-05 12:31
VLAI
Details

Improper Control of Generation of Code ('Code Injection') vulnerability in Soflyy Oxygen Builder allows Code Injection.This issue affects Oxygen Builder: from n/a through 4.8.1.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-31380"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-04-03T12:15:13Z",
    "severity": "CRITICAL"
  },
  "details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Soflyy Oxygen Builder allows Code Injection.This issue affects Oxygen Builder: from n/a through 4.8.1.\n\n",
  "id": "GHSA-xjx3-c2f9-8m6p",
  "modified": "2024-06-05T12:31:51Z",
  "published": "2024-04-03T12:31:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31380"
    },
    {
      "type": "WEB",
      "url": "https://patchstack.com/articles/unpatched-authenticated-rce-in-oxygen-and-breakdance-builder?_s_id=cve"
    },
    {
      "type": "WEB",
      "url": "https://patchstack.com/database/vulnerability/oxygen/wordpress-oxygen-plugin-4-8-1-auth-remote-code-execution-rce-vulnerability?_s_id=cve"
    },
    {
      "type": "WEB",
      "url": "https://snicco.io/vulnerability-disclosure/oxygen/client-control-remote-code-execution-oxygen-4-8-1"
    },
    {
      "type": "WEB",
      "url": "https://snicco.io/vulnerability-disclosure/oxygen/client-control-remote-code-execution-oxygen-4-8-1?_s_id=cve"
    }
  ],
  "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"
    }
  ]
}

GHSA-XM2M-2Q6H-22JW

Vulnerability from github – Published: 2023-06-12 18:30 – Updated: 2025-02-13 18:58
VLAI
Summary
Apache NiFi vulnerable to Code Injection
Details

The DBCPConnectionPool and HikariCPConnectionPool Controller Services in Apache NiFi 0.0.2 through 1.21.0 allow an authenticated and authorized user to configure a Database URL with the H2 driver that enables custom code execution.

The resolution validates the Database URL and rejects H2 JDBC locations.

You are recommended to upgrade to version 1.22.0 or later which fixes this issue.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.apache.nifi:nifi-dbcp-base"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.2"
            },
            {
              "fixed": "1.22.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.apache.nifi:nifi-hikari-dbcp-service"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.2"
            },
            {
              "fixed": "1.22.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.apache.nifi:nifi-dbcp-service-nar"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.2"
            },
            {
              "fixed": "1.22.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-34468"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-06-12T20:29:34Z",
    "nvd_published_at": "2023-06-12T16:15:10Z",
    "severity": "HIGH"
  },
  "details": "The DBCPConnectionPool and HikariCPConnectionPool Controller Services in Apache NiFi 0.0.2 through 1.21.0 allow an authenticated and authorized user to configure a Database URL with the H2 driver that enables custom code execution.\n\nThe resolution validates the Database URL and rejects H2 JDBC locations.\n\nYou are recommended to upgrade to version 1.22.0 or later which fixes this issue.",
  "id": "GHSA-xm2m-2q6h-22jw",
  "modified": "2025-02-13T18:58:07Z",
  "published": "2023-06-12T18:30:18Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-34468"
    },
    {
      "type": "WEB",
      "url": "https://github.com/apache/nifi/pull/7349"
    },
    {
      "type": "WEB",
      "url": "https://github.com/apache/nifi/commit/4faf3ea59895e7e153db3f8f61147ff70a254361"
    },
    {
      "type": "WEB",
      "url": "https://exceptionfactory.com/posts/2023/10/07/firsthand-analysis-of-apache-nifi-vulnerability-cve-2023-34468"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/apache/nifi"
    },
    {
      "type": "WEB",
      "url": "https://issues.apache.org/jira/browse/NIFI-11653"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread/7b82l4f5blmpkfcynf3y6z4x1vqo59h8"
    },
    {
      "type": "WEB",
      "url": "https://nifi.apache.org/security.html#CVE-2023-34468"
    },
    {
      "type": "WEB",
      "url": "https://www.cyfirma.com/outofband/apache-nifi-cve-2023-34468-rce-vulnerability-analysis-and-exploitation"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/174398/Apache-NiFi-H2-Connection-String-Remote-Code-Execution.html"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2023/06/12/3"
    }
  ],
  "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"
    }
  ],
  "summary": "Apache NiFi vulnerable to Code Injection"
}

GHSA-XM3P-M4GM-9W7R

Vulnerability from github – Published: 2022-05-02 03:34 – Updated: 2022-05-02 03:34
VLAI
Details

Multiple static code injection vulnerabilities in CMS Chainuk 1.2 and earlier allow remote attackers to inject arbitrary PHP code (1) into settings.php via the menu parameter to admin_settings.php or (2) into a content/=NUMBER.php file via the title parameter to admin_new.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-2331"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-07-05T16:30:00Z",
    "severity": "HIGH"
  },
  "details": "Multiple static code injection vulnerabilities in CMS Chainuk 1.2 and earlier allow remote attackers to inject arbitrary PHP code (1) into settings.php via the menu parameter to admin_settings.php or (2) into a content/=NUMBER.php file via the title parameter to admin_new.php.",
  "id": "GHSA-xm3p-m4gm-9w7r",
  "modified": "2022-05-02T03:34:06Z",
  "published": "2022-05-02T03:34:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-2331"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/55672"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/55673"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/9069"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-XM44-79F8-Q8R7

Vulnerability from github – Published: 2024-05-21 18:31 – Updated: 2024-07-03 18:42
VLAI
Details

The vCenter Server contains an authenticated remote code execution vulnerability. A malicious actor with administrative privileges on the vCenter appliance shell may exploit this issue to run arbitrary commands on the underlying operating system.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-22274"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-05-21T18:15:09Z",
    "severity": "HIGH"
  },
  "details": "The vCenter Server contains an authenticated remote code execution vulnerability.\u00a0A malicious actor with administrative privileges on the vCenter appliance shell may exploit this issue to run arbitrary commands on the underlying operating system.",
  "id": "GHSA-xm44-79f8-q8r7",
  "modified": "2024-07-03T18:42:58Z",
  "published": "2024-05-21T18:31:23Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22274"
    },
    {
      "type": "WEB",
      "url": "https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/SecurityAdvisories/0/24308"
    }
  ],
  "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:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XM4H-3JXR-M3C6

Vulnerability from github – Published: 2024-04-10 17:13 – Updated: 2024-04-10 22:01
VLAI
Summary
XWiki Platform: Remote code execution through space title and Solr space facet
Details

Impact

By creating a document with a specially crafted title, it is possible to trigger remote code execution in the (Solr-based) search in XWiki. This allows any user who can edit the title of a space (all users by default) to execute any Groovy code in the XWiki installation which compromises the confidentiality, integrity and availability of the whole XWiki installation.

To reproduce, as a user without script nor programming rights, create a document with title {{/html}}{{async}}{{groovy}}println("Hello from Groovy Title!"){{/groovy}}{{/async}} and content Test Document. Using the search UI, search for "Test Document", then deploy the Location facet on the right of the screen, next to the search results. The installation is vulnerable if you see an item such as:

Hello from Groovy Title!
</a>
<div class="itemCount">1</div>
</li>
</ul>
{{/html}}

Patches

This has been patched in XWiki 14.10.20, 15.5.4 and 15.10 RC1.

Workarounds

Modify the Main.SolrSpaceFacet page following this patch.

References

  • https://jira.xwiki.org/browse/XWIKI-21471
  • https://github.com/xwiki/xwiki-platform/commit/acba74c149a041345b24dcca52c586f872ba97fb
  • https://github.com/xwiki/xwiki-platform/commit/74e301c481e69eeea674dac7fed6af3614cf08c5
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-search-solr-ui"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "7.2-rc-1"
            },
            {
              "fixed": "14.10.20"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-search-solr-ui"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "15.0-rc-1"
            },
            {
              "fixed": "15.5.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-search-solr-ui"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "15.6-rc-1"
            },
            {
              "fixed": "15.10-rc-1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-31984"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94",
      "CWE-95"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-04-10T17:13:15Z",
    "nvd_published_at": "2024-04-10T20:15:08Z",
    "severity": "CRITICAL"
  },
  "details": "### Impact\nBy creating a document with a specially crafted title, it is possible to trigger remote code execution in the (Solr-based) search in XWiki. This allows any user who can edit the title of a space (all users by default) to execute any Groovy code in the XWiki installation which compromises the confidentiality, integrity and availability of the whole XWiki installation.\n\nTo reproduce, as a user without script nor programming rights, create a document with title `{{/html}}{{async}}{{groovy}}println(\"Hello from Groovy Title!\"){{/groovy}}{{/async}}` and content `Test Document`. Using the search UI, search for `\"Test Document\"`, then deploy the `Location` facet on the right of the screen, next to the search results. The installation is vulnerable if you see an item such as:\n```\nHello from Groovy Title!\n\u003c/a\u003e\n\u003cdiv class=\"itemCount\"\u003e1\u003c/div\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n{{/html}}\n```\n\n### Patches\nThis has been patched in XWiki 14.10.20, 15.5.4 and 15.10 RC1.\n\n### Workarounds\nModify the `Main.SolrSpaceFacet` page following this [patch](https://github.com/xwiki/xwiki-platform/commit/acba74c149a041345b24dcca52c586f872ba97fb#diff-22dd1949ed9019a39f2550f5a953a1a967c30a374dc9eeddb74069bf229b17d5).\n\n### References\n* https://jira.xwiki.org/browse/XWIKI-21471\n* https://github.com/xwiki/xwiki-platform/commit/acba74c149a041345b24dcca52c586f872ba97fb\n* https://github.com/xwiki/xwiki-platform/commit/74e301c481e69eeea674dac7fed6af3614cf08c5\n",
  "id": "GHSA-xm4h-3jxr-m3c6",
  "modified": "2024-04-10T22:01:16Z",
  "published": "2024-04-10T17:13:15Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-xm4h-3jxr-m3c6"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31984"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/43c9d551e3c11e9d8f176b556dd33bbe31fc66e0"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/5ef9d294d37be92ee22b2549e38663b29dce8767"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/74e301c481e69eeea674dac7fed6af3614cf08c5"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/94fc12db87c2431eb1335ecb9c2954b1905bde62"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/acba74c149a041345b24dcca52c586f872ba97fb"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/ef55105d6eeec5635fd693f0070c5aaaf3bdd940"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/xwiki/xwiki-platform"
    },
    {
      "type": "WEB",
      "url": "https://jira.xwiki.org/browse/XWIKI-21471"
    }
  ],
  "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": "XWiki Platform: Remote code execution through space title and Solr space facet"
}

GHSA-XM98-3VCF-FPH7

Vulnerability from github – Published: 2026-08-24 19:20 – Updated: 2026-08-24 19:20
VLAI
Summary
mcp-contextforge-gateway has RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server
Details

Commit: f855e54d5b7bc1c91b977574a03b91eff6b86bb6 Component: mcp-servers/python/python_sandbox_server/src/python_sandbox_server/server_fastmcp.py

Vulnerability

RestrictedPython's sandbox in ContextForge's python_sandbox_server sub-project allows arbitrary Python execution via three compounding weaknesses:

  1. Raw getattr is exposed in safe_builtins, bypassing _getattr_ mediation.
  2. validate_code checks for literal dangerous dunder strings, but the payload constructs those names at runtime.
  3. The execute_code MCP tool can be exposed over HTTP/SSE transport with no authentication layer.

Proof of Concept

The local PoC was executed against the real pinned sandbox code path. It constructs dunder names at runtime, walks Python's class hierarchy through the exposed getattr, finds subprocess.Popen, and executes a harmless marker command.

Transcript excerpt:

POC: IBM/mcp-context-forge RestrictedPython getattr sandbox bypass
validation={'valid': True, 'message': 'Code passed validation', 'warnings': None}
success=True
stdout="FOUND_POPEN\nb'IBM_SANDBOX_POC_PASS'\n"
IBM_RESTRICTEDPYTHON_GETATTR_POPEN_REPRO_PASS

PoC artifact hashes:

beb2d856c5a1b7c10005c9c0fccaf3d491d4fbcc2a69bc54b5e95c5730c0874b  run.py
1037dcb4f0831a3c96ca728527f939af1d3e19514b23ef54f663707875748ff8  run.sh
7026e676ee31916886f10feed959ffdbe486fda05b17421387e4717acbf90ba6  transcript.txt

Production Deployment Context

ContextForge's documentation describes registering MCP servers as gateways in a running ContextForge instance. If this sandbox server is reachable over HTTP in that pattern, any client that can reach the endpoint can submit the payload through tools/call.

Impact

An attacker with access to the python_sandbox_server HTTP endpoint can execute OS commands with the privileges of the server process. In containerized deployments with host mounts or internal network reachability, this can become filesystem compromise or network pivoting from the gateway host.

Suggested Fix

Remove raw getattr and setattr from safe_builtins, expose only policy-controlled attribute access if dynamic lookup is required, replace substring filtering with a stricter RestrictedPython policy pipeline, and add authentication to HTTP transport for all tools/call requests.

Caveats

This report covers the python_sandbox_server sub-project. The core ContextForge gateway and proxy components are not directly affected. The Critical score assumes HTTP reachability; stdio-only deployments reduce the attack vector.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.0.1"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "mcp-contextforge-gateway"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.0.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-53710"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94",
      "CWE-693"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-24T19:20:58Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "**Commit:** `f855e54d5b7bc1c91b977574a03b91eff6b86bb6`\n**Component:** `mcp-servers/python/python_sandbox_server/src/python_sandbox_server/server_fastmcp.py`\n\n## Vulnerability\n\nRestrictedPython\u0027s sandbox in ContextForge\u0027s `python_sandbox_server` sub-project allows arbitrary Python execution via three compounding weaknesses:\n\n1. Raw `getattr` is exposed in `safe_builtins`, bypassing `_getattr_` mediation.\n2. `validate_code` checks for literal dangerous dunder strings, but the payload constructs those names at runtime.\n3. The `execute_code` MCP tool can be exposed over HTTP/SSE transport with no authentication layer.\n\n## Proof of Concept\n\nThe local PoC was executed against the real pinned sandbox code path. It constructs dunder names at runtime, walks Python\u0027s class hierarchy through the exposed `getattr`, finds `subprocess.Popen`, and executes a harmless marker command.\n\nTranscript excerpt:\n\n```text\nPOC: IBM/mcp-context-forge RestrictedPython getattr sandbox bypass\nvalidation={\u0027valid\u0027: True, \u0027message\u0027: \u0027Code passed validation\u0027, \u0027warnings\u0027: None}\nsuccess=True\nstdout=\"FOUND_POPEN\\nb\u0027IBM_SANDBOX_POC_PASS\u0027\\n\"\nIBM_RESTRICTEDPYTHON_GETATTR_POPEN_REPRO_PASS\n```\n\nPoC artifact hashes:\n\n```text\nbeb2d856c5a1b7c10005c9c0fccaf3d491d4fbcc2a69bc54b5e95c5730c0874b  run.py\n1037dcb4f0831a3c96ca728527f939af1d3e19514b23ef54f663707875748ff8  run.sh\n7026e676ee31916886f10feed959ffdbe486fda05b17421387e4717acbf90ba6  transcript.txt\n```\n\n## Production Deployment Context\n\nContextForge\u0027s documentation describes registering MCP servers as gateways in a running ContextForge instance. If this sandbox server is reachable over HTTP in that pattern, any client that can reach the endpoint can submit the payload through `tools/call`.\n\n## Impact\n\nAn attacker with access to the `python_sandbox_server` HTTP endpoint can execute OS commands with the privileges of the server process. In containerized deployments with host mounts or internal network reachability, this can become filesystem compromise or network pivoting from the gateway host.\n\n## Suggested Fix\n\nRemove raw `getattr` and `setattr` from `safe_builtins`, expose only policy-controlled attribute access if dynamic lookup is required, replace substring filtering with a stricter RestrictedPython policy pipeline, and add authentication to HTTP transport for all `tools/call` requests.\n\n## Caveats\n\nThis report covers the `python_sandbox_server` sub-project. The core ContextForge gateway and proxy components are not directly affected. The Critical score assumes HTTP reachability; stdio-only deployments reduce the attack vector.",
  "id": "GHSA-xm98-3vcf-fph7",
  "modified": "2026-08-24T19:20:58Z",
  "published": "2026-08-24T19:20:58Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/IBM/mcp-context-forge/security/advisories/GHSA-xm98-3vcf-fph7"
    },
    {
      "type": "WEB",
      "url": "https://github.com/IBM/mcp-context-forge/commit/63a2900e6301b9c8a483a38d3737a1beb3a7ce89"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/IBM/mcp-context-forge"
    },
    {
      "type": "WEB",
      "url": "https://github.com/IBM/mcp-context-forge/releases#release-v1.0.2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V4"
    }
  ],
  "summary": "mcp-contextforge-gateway has RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server"
}

GHSA-XMFC-GG3F-RP48

Vulnerability from github – Published: 2022-05-17 05:34 – Updated: 2025-04-11 03:54
VLAI
Details

Static code injection vulnerability in translate.php in Support Incident Tracker (aka SiT!) 3.45 through 3.65 allows remote attackers to inject arbitrary PHP code into an executable language file in the i18n directory via the lang variable.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2011-4337"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2012-01-29T11:55:00Z",
    "severity": "HIGH"
  },
  "details": "Static code injection vulnerability in translate.php in Support Incident Tracker (aka SiT!) 3.45 through 3.65 allows remote attackers to inject arbitrary PHP code into an executable language file in the i18n directory via the lang variable.",
  "id": "GHSA-xmfc-gg3f-rp48",
  "modified": "2025-04-11T03:54:53Z",
  "published": "2022-05-17T05:34:47Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2011-4337"
    },
    {
      "type": "WEB",
      "url": "http://bugs.sitracker.org/view.php?id=1737"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/18132"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2011/11/22/3"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/520577"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-XMM6-6GQM-6VJQ

Vulnerability from github – Published: 2024-08-28 09:30 – Updated: 2024-08-28 09:30
VLAI
Details

A code execution vulnerability exists in the XiaomiGetApps application product. This vulnerability is caused by the verification logic being bypassed, and an attacker can exploit this vulnerability to execute malicious code.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-26324"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-08-28T08:15:06Z",
    "severity": "HIGH"
  },
  "details": "A code execution vulnerability exists in the XiaomiGetApps application product. This vulnerability is caused by the verification logic being bypassed, and an attacker can exploit this vulnerability to execute malicious code.",
  "id": "GHSA-xmm6-6gqm-6vjq",
  "modified": "2024-08-28T09:30:34Z",
  "published": "2024-08-28T09:30:34Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-26324"
    },
    {
      "type": "WEB",
      "url": "https://https://trust.mi.com/misrc/bulletins/advisory?cveId=544"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XMMX-P598-4C34

Vulnerability from github – Published: 2022-05-01 06:53 – Updated: 2022-05-01 06:53
VLAI
Details

Multiple PHP remote file inclusion vulnerabilities in myWebland myEvent 1.2 allow remote attackers to execute arbitrary PHP code via a URL in the myevent_path parameter in (1) event.php and (2) initialize.php. NOTE: vector 2 was later reported to affect 1.4 as well.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2006-1890"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2006-04-20T10:02:00Z",
    "severity": "HIGH"
  },
  "details": "Multiple PHP remote file inclusion vulnerabilities in myWebland myEvent 1.2 allow remote attackers to execute arbitrary PHP code via a URL in the myevent_path parameter in (1) event.php and (2) initialize.php.  NOTE: vector 2 was later reported to affect 1.4 as well.",
  "id": "GHSA-xmmx-p598-4c34",
  "modified": "2022-05-01T06:53:43Z",
  "published": "2022-05-01T06:53:43Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2006-1890"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/25882"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/28347"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/19680"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/726"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/767"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1016616"
    },
    {
      "type": "WEB",
      "url": "http://www.osvdb.org/24722"
    },
    {
      "type": "WEB",
      "url": "http://www.osvdb.org/24723"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/431125/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/17575"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/1384"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

Mitigation
Architecture and Design

Strategy: Refactoring

Refactor your program so that you do not have to dynamically generate code.

Mitigation
Architecture and Design
  • Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product.
  • Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.
  • This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.
  • Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-5
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().
Mitigation
Testing

Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.

Mitigation MIT-32
Operation

Strategy: Compilation or Build Hardening

Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).

Mitigation MIT-32
Operation

Strategy: Environment Hardening

Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).

Mitigation
Implementation

For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].

CAPEC-242: Code Injection

An adversary exploits a weakness in input validation on the target to inject new code into that which is currently executing. This differs from code inclusion in that code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application.

CAPEC-35: Leverage Executable Code in Non-Executable Files

An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.

CAPEC-77: Manipulating User-Controlled Variables

This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.