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.
8342 vulnerabilities reference this CWE, most recent first.
GHSA-PVG7-JQ3V-HMQ6
Vulnerability from github – Published: 2025-11-30 09:30 – Updated: 2025-11-30 09:30A vulnerability was detected in taosir WTCMS up to 01a5f68a3dfc2fdddb44eed967bb2d4f60487665. Impacted is the function fetch of the file /index.php. Performing manipulation of the argument content results in code injection. It is possible to initiate the attack remotely. The exploit is now public and may be used. This product is using a rolling release to provide continious delivery. Therefore, no version details for affected nor updated releases are available. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2025-13786"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-11-30T09:15:45Z",
"severity": "MODERATE"
},
"details": "A vulnerability was detected in taosir WTCMS up to 01a5f68a3dfc2fdddb44eed967bb2d4f60487665. Impacted is the function fetch of the file /index.php. Performing manipulation of the argument content results in code injection. It is possible to initiate the attack remotely. The exploit is now public and may be used. This product is using a rolling release to provide continious delivery. Therefore, no version details for affected nor updated releases are available. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-pvg7-jq3v-hmq6",
"modified": "2025-11-30T09:30:18Z",
"published": "2025-11-30T09:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-13786"
},
{
"type": "WEB",
"url": "https://github.com/TiKi-r/CVE-Report/blob/main/WtcmsRCE.md"
},
{
"type": "WEB",
"url": "https://github.com/TiKi-r/CVE-Report/blob/main/WtcmsRCE.md#3-proof-of-concept-poc"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.333790"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.333790"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.689523"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/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"
}
]
}
GHSA-PW24-VXQ6-GHRM
Vulnerability from github – Published: 2025-02-12 00:32 – Updated: 2025-02-13 00:33An issue in Team Amaze Amaze File Manager v.3.8.5 and fixed in v.3.10 allows a local attacker to execute arbitrary code via the onCreate method of DatabaseViewerActivity.java.
{
"affected": [],
"aliases": [
"CVE-2024-33469"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-11T23:15:08Z",
"severity": "MODERATE"
},
"details": "An issue in Team Amaze Amaze File Manager v.3.8.5 and fixed in v.3.10 allows a local attacker to execute arbitrary code via the onCreate method of DatabaseViewerActivity.java.",
"id": "GHSA-pw24-vxq6-ghrm",
"modified": "2025-02-13T00:33:03Z",
"published": "2025-02-12T00:32:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-33469"
},
{
"type": "WEB",
"url": "https://github.com/blackbeard666/security-research/tree/main/CVE-2024-33469"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/981c1cb3-d1e7-4f5c-8a24-155662d33787"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-PW38-XV9X-H8CH
Vulnerability from github – Published: 2024-05-16 09:33 – Updated: 2024-05-16 17:47A command injection vulnerability exists in the RunGptLLM class of the llama_index library, version 0.9.47, used by the RunGpt framework from JinaAI to connect to Language Learning Models (LLMs). The vulnerability arises from the improper use of the eval function, allowing a malicious or compromised LLM hosting provider to execute arbitrary commands on the client's machine. This issue was fixed in version 0.10.13. The exploitation of this vulnerability could lead to a hosting provider gaining full control over client machines.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "llama-index"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.10.13"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "llama-index-llms-rungpt"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-4181"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-05-16T17:47:36Z",
"nvd_published_at": "2024-05-16T09:15:15Z",
"severity": "HIGH"
},
"details": "A command injection vulnerability exists in the RunGptLLM class of the llama_index library, version 0.9.47, used by the RunGpt framework from JinaAI to connect to Language Learning Models (LLMs). The vulnerability arises from the improper use of the eval function, allowing a malicious or compromised LLM hosting provider to execute arbitrary commands on the client\u0027s machine. This issue was fixed in version 0.10.13. The exploitation of this vulnerability could lead to a hosting provider gaining full control over client machines.",
"id": "GHSA-pw38-xv9x-h8ch",
"modified": "2024-05-16T17:47:36Z",
"published": "2024-05-16T09:33:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-4181"
},
{
"type": "WEB",
"url": "https://github.com/run-llama/llama_index/commit/d73715eaf0642705583e7897c78b9c8dd2d3a7ba"
},
{
"type": "PACKAGE",
"url": "https://github.com/run-llama/llama_index"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/1a204520-598a-434e-b13d-0d34f2a5ddc1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "RunGptLLM class in LlamaIndex has a command injection"
}
GHSA-PW67-XJHQ-389W
Vulnerability from github – Published: 2025-04-17 18:31 – Updated: 2026-06-08 19:04Pycel through 1.0b30, when operating on an untrusted spreadsheet, allows code execution via a crafted formula in a cell, such as one beginning with the =IF(A1=200, eval("__import__('os').system( substring.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "pycel"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.0b30"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-53924"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-04-22T17:04:11Z",
"nvd_published_at": "2025-04-17T18:15:47Z",
"severity": "HIGH"
},
"details": "Pycel through 1.0b30, when operating on an untrusted spreadsheet, allows code execution via a crafted formula in a cell, such as one beginning with the `=IF(A1=200, eval(\"__import__(\u0027os\u0027).system(` substring.",
"id": "GHSA-pw67-xjhq-389w",
"modified": "2026-06-08T19:04:26Z",
"published": "2025-04-17T18:31:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-53924"
},
{
"type": "WEB",
"url": "https://gist.github.com/aelmosalamy/cb098e61939718d2bb248fd1cc94f287"
},
{
"type": "WEB",
"url": "https://github.com/dgorissen/pycel"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/pycel/PYSEC-2025-177.yaml"
},
{
"type": "PACKAGE",
"url": "https://github.com/stephenrauch/pycel"
},
{
"type": "WEB",
"url": "https://pypi.org/project/pycel"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "Pycel allows code injection via a crafted formula"
}
GHSA-PW79-H962-2RW9
Vulnerability from github – Published: 2022-05-17 01:37 – Updated: 2022-05-17 01:37The App::Context module 0.01 through 0.968 for Perl does not properly use the Storable::thaw function, which allows remote attackers to execute arbitrary code via a crafted request to (1) App::Session::Cookie or (2) App::Session::HTMLHidden, which is not properly handled when it is deserialized.
{
"affected": [],
"aliases": [
"CVE-2012-6141"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-06-04T23:55:00Z",
"severity": "HIGH"
},
"details": "The App::Context module 0.01 through 0.968 for Perl does not properly use the Storable::thaw function, which allows remote attackers to execute arbitrary code via a crafted request to (1) App::Session::Cookie or (2) App::Session::HTMLHidden, which is not properly handled when it is deserialized.",
"id": "GHSA-pw79-h962-2rw9",
"modified": "2022-05-17T01:37:42Z",
"published": "2022-05-17T01:37:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-6141"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/84198"
},
{
"type": "WEB",
"url": "http://seclists.org/oss-sec/2013/q2/318"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-PW85-C3XJ-RM6M
Vulnerability from github – Published: 2022-05-02 03:41 – Updated: 2022-05-02 03:41Mozilla Firefox before 3.0.14, and 3.5.x before 3.5.3, does not properly manage pointers for the columns (aka TreeColumns) of a XUL tree element, which allows remote attackers to execute arbitrary code via a crafted HTML document, related to a "dangling pointer vulnerability."
{
"affected": [],
"aliases": [
"CVE-2009-3077"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-09-10T21:30:00Z",
"severity": "HIGH"
},
"details": "Mozilla Firefox before 3.0.14, and 3.5.x before 3.5.3, does not properly manage pointers for the columns (aka TreeColumns) of a XUL tree element, which allows remote attackers to execute arbitrary code via a crafted HTML document, related to a \"dangling pointer vulnerability.\"",
"id": "GHSA-pw85-c3xj-rm6m",
"modified": "2022-05-02T03:41:30Z",
"published": "2022-05-02T03:41:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3077"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=506871"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10730"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A5606"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2010-06/msg00001.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36669"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36670"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36671"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36692"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37098"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/38977"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/39001"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2009/dsa-1885"
},
{
"type": "WEB",
"url": "http://www.mozilla.org/security/announce/2009/mfsa2009-49.html"
},
{
"type": "WEB",
"url": "http://www.novell.com/linux/security/advisories/2009_48_firefox.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2009-1430.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2009-1431.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2009-1432.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2010-0153.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2010-0154.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/36343"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-915-1"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/0650"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-PW8R-X2QM-3H5M
Vulnerability from github – Published: 2022-05-14 01:57 – Updated: 2023-08-16 09:30Apache Struts 2 before 2.3.14.3 allows remote attackers to execute arbitrary OGNL code via a request with a crafted value that contains both "${}" and "%{}" sequences, which causes the OGNL code to be evaluated twice.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.struts:struts2-core"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.3.14.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.struts.xwork:xwork-core"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.3.14.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2013-2135"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-11-03T20:39:47Z",
"nvd_published_at": "2013-07-16T18:55:00Z",
"severity": "HIGH"
},
"details": "Apache Struts 2 before 2.3.14.3 allows remote attackers to execute arbitrary OGNL code via a request with a crafted value that contains both \"${}\" and \"%{}\" sequences, which causes the OGNL code to be evaluated twice.",
"id": "GHSA-pw8r-x2qm-3h5m",
"modified": "2023-08-16T09:30:38Z",
"published": "2022-05-14T01:57:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-2135"
},
{
"type": "WEB",
"url": "https://github.com/apache/struts/commit/01e6b251b4db78bfb7971033652e81d1af4cb3e0"
},
{
"type": "WEB",
"url": "https://github.com/apache/struts/commit/041206d2a693d02c0cb2e72765275e55ba14049f"
},
{
"type": "WEB",
"url": "https://github.com/apache/struts/commit/113c47082c09818bcef65acc436a2d0c7c47aa6c"
},
{
"type": "WEB",
"url": "https://github.com/apache/struts/commit/54e5c912ebd9a1599bfcf7a719da17c28127bbe3"
},
{
"type": "WEB",
"url": "https://github.com/apache/struts/commit/711cf0201cdd319a38cf29238913312355db29ba"
},
{
"type": "WEB",
"url": "https://github.com/apache/struts/commit/8b4fc81daeea3834bcbf73de5f48d0021917aa37"
},
{
"type": "WEB",
"url": "https://github.com/apache/struts/commit/cfb6e9afbae320a4dd5bdd655154ab9fe5a92c16"
},
{
"type": "WEB",
"url": "https://cwiki.apache.org/confluence/display/WW/S2-015"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/struts"
},
{
"type": "WEB",
"url": "https://issues.apache.org/jira/browse/WW-4090"
},
{
"type": "WEB",
"url": "https://issues.apache.org/jira/browse/WW-4094"
},
{
"type": "WEB",
"url": "https://issues.apache.org/jira/browse/WW-4095"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20140410223942/http://www.securityfocus.com/bid/64758"
},
{
"type": "WEB",
"url": "http://struts.apache.org/development/2.x/docs/s2-015.html"
},
{
"type": "WEB",
"url": "http://www.oracle.com/technetwork/topics/security/cpujan2014-1972949.html"
},
{
"type": "WEB",
"url": "http://www.oracle.com/technetwork/topics/security/cpuoct2013-1899837.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Arbitrary code execution in Apache Struts 2"
}
GHSA-PW8X-JQ9M-HMC9
Vulnerability from github – Published: 2024-07-21 06:30 – Updated: 2024-07-21 06:30A vulnerability was found in DedeCMS 5.7.114. It has been classified as critical. This affects an unknown part of the file article_template_rand.php. The manipulation leads to code injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-271995. NOTE: The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2024-6940"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-07-21T06:15:04Z",
"severity": "MODERATE"
},
"details": "A vulnerability was found in DedeCMS 5.7.114. It has been classified as critical. This affects an unknown part of the file article_template_rand.php. The manipulation leads to code injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-271995. NOTE: The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-pw8x-jq9m-hmc9",
"modified": "2024-07-21T06:30:35Z",
"published": "2024-07-21T06:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6940"
},
{
"type": "WEB",
"url": "https://gitee.com/fushuling/cve/blob/master/dedeCMS%20V5.7.114%20article_template_rand.php%20code%20injection.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.271995"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.271995"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.372810"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:L/VA:L/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"
}
]
}
GHSA-PWC5-C4JF-RGX2
Vulnerability from github – Published: 2022-05-01 07:13 – Updated: 2022-05-01 07:13PHP remote file inclusion vulnerability in artlinks.dispnew.php in the Artlinks component (com_artlinks) for Mambo allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.
{
"affected": [],
"aliases": [
"CVE-2006-3949"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-08-01T21:04:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in artlinks.dispnew.php in the Artlinks component (com_artlinks) for Mambo allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.",
"id": "GHSA-pwc5-c4jf-rgx2",
"modified": "2022-05-01T07:13:48Z",
"published": "2022-05-01T07:13:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-3949"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/28075"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/1318"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/441541/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/19223"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-PWF7-47C3-MFHX
Vulnerability from github – Published: 2025-09-29 17:51 – Updated: 2025-09-29 17:51Summary
There are three potential attacks of arbitrary code injection vulnerability in the composite action at action.yml.
Details
The GitHub Action variables inputs.prek-version, inputs.extra_args, and inputs.extra-args can be used to execute arbitrary code in the context of the action.
PoC
- uses: j178/prek-action@v1.0.5
with:
prek-version: $(printenv >> $GITHUB_STEP_SUMMARY && echo "0.2.2")
extra_args: '&& echo "MY_SECRET with a character is: ${MY_SECRET:0:1}a${MY_SECRET:1}" >> $GITHUB_STEP_SUMMARY && echo ""'
env:
MY_SECRET: ${{ secrets.MY_SECRET }}
The previous example will print all the environment variables, and it will expose MY_SECRET environment variable value to the summary of the workflow. An attacker could potentially use this vector to compromise the security of the target repository, even passing unnotice because the action will run normally.
Impact
Critical, CWE-94
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.0.5"
},
"package": {
"ecosystem": "GitHub Actions",
"name": "j178/prek-action"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.0.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-29T17:51:19Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "### Summary\nThere are three potential attacks of arbitrary code injection vulnerability in the composite action at _action.yml_.\n\n### Details\nThe GitHub Action variables `inputs.prek-version`, `inputs.extra_args`, and `inputs.extra-args` can be used to execute arbitrary code in the context of the action.\n\n### PoC\n```yaml\n- uses: j178/prek-action@v1.0.5\n with:\n prek-version: $(printenv \u003e\u003e $GITHUB_STEP_SUMMARY \u0026\u0026 echo \"0.2.2\")\n extra_args: \u0027\u0026\u0026 echo \"MY_SECRET with a character is: ${MY_SECRET:0:1}a${MY_SECRET:1}\" \u003e\u003e $GITHUB_STEP_SUMMARY \u0026\u0026 echo \"\"\u0027\n env:\n MY_SECRET: ${{ secrets.MY_SECRET }}\n```\n\nThe previous example will print all the environment variables, and it will expose `MY_SECRET` environment variable value to the summary of the workflow. An attacker could potentially use this vector to compromise the security of the target repository, even passing unnotice because the action will run normally.\n\n### Impact\nCritical, CWE-94",
"id": "GHSA-pwf7-47c3-mfhx",
"modified": "2025-09-29T17:51:19Z",
"published": "2025-09-29T17:51:19Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/j178/prek-action/security/advisories/GHSA-pwf7-47c3-mfhx"
},
{
"type": "WEB",
"url": "https://github.com/j178/prek-action/commit/6b7c6ef5c3875c766893b881b40773cd5605bde3"
},
{
"type": "PACKAGE",
"url": "https://github.com/j178/prek-action"
}
],
"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": "j178/prek-action vulnerable to arbitrary code injection in composite action"
}
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.