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.
8272 vulnerabilities reference this CWE, most recent first.
GHSA-H4W3-5JJX-JXHM
Vulnerability from github – Published: 2023-04-04 15:30 – Updated: 2023-04-10 21:30File Upload vulnerability found in KiteCMS v.1.1 allows a remote attacker to execute arbitrary code via the uploadFile function.
{
"affected": [],
"aliases": [
"CVE-2021-3267"
],
"database_specific": {
"cwe_ids": [
"CWE-434",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-04-04T15:15:00Z",
"severity": "HIGH"
},
"details": "File Upload vulnerability found in KiteCMS v.1.1 allows a remote attacker to execute arbitrary code via the uploadFile function.",
"id": "GHSA-h4w3-5jjx-jxhm",
"modified": "2023-04-10T21:30:23Z",
"published": "2023-04-04T15:30:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3267"
},
{
"type": "WEB",
"url": "https://github.com/Kitesky/KiteCMS/issues/6"
}
],
"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-H4W3-HXW6-99Q7
Vulnerability from github – Published: 2026-01-21 18:30 – Updated: 2026-01-21 21:30A vulnerability in Cisco Unified Communications Manager (Unified CM), Cisco Unified Communications Manager Session Management Edition (Unified CM SME), Cisco Unified Communications Manager IM & Presence Service (Unified CM IM&P), Cisco Unity Connection, and Cisco Webex Calling Dedicated Instance could allow an unauthenticated, remote attacker to execute arbitrary commands on the underlying operating system of an affected device.
This vulnerability is due to improper validation of user-supplied input in HTTP requests. An attacker could exploit this vulnerability by sending a sequence of crafted HTTP requests to the web-based management interface of an affected device. A successful exploit could allow the attacker to obtain user-level access to the underlying operating system and then elevate privileges to root. Note: Cisco has assigned this security advisory a Security Impact Rating (SIR) of Critical rather than High as the score indicates. The reason is that exploitation of this vulnerability could result in an attacker elevating privileges to root.
{
"affected": [],
"aliases": [
"CVE-2026-20045"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-01-21T17:16:08Z",
"severity": "HIGH"
},
"details": "A vulnerability in Cisco Unified Communications Manager (Unified CM), Cisco Unified Communications Manager Session Management Edition (Unified CM SME), Cisco Unified Communications Manager IM \u0026amp; Presence Service (Unified CM IM\u0026amp;P), Cisco Unity Connection, and Cisco Webex Calling Dedicated Instance could allow an unauthenticated, remote attacker\u0026nbsp;to execute arbitrary commands on the underlying operating system of an affected device.\u0026nbsp;\n\nThis vulnerability is due to improper validation of user-supplied input in HTTP requests. An attacker could exploit this vulnerability by sending a sequence of crafted HTTP requests to the web-based management interface of an affected device. A successful exploit could allow the attacker to obtain user-level access to the underlying operating system and then elevate privileges to root.\nNote: Cisco has assigned this security advisory a Security Impact Rating (SIR) of Critical rather than High as the score indicates. The reason is that exploitation of this vulnerability could result in an attacker elevating privileges to root.",
"id": "GHSA-h4w3-hxw6-99q7",
"modified": "2026-01-21T21:30:29Z",
"published": "2026-01-21T18:30:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-20045"
},
{
"type": "WEB",
"url": "https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-voice-rce-mORhqY4b"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-20045"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-H526-WF6G-67JV
Vulnerability from github – Published: 2026-01-21 01:01 – Updated: 2026-01-21 17:08Impact
Arbitrary code execution in environments consuming generated clients
This issue is similar in nature to the recently-patched MCP vulnerability (CVE-2026-22785), but affects a different code path in @orval/core that was not addressed by that fix.
The vulnerability allows untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript code into generated clients via the x-enumDescriptions field, which is embedded without proper escaping in getEnumImplementation(). I have confirmed that the injection occurs during const enum generation and results in executable code within the generated schema files.
Patches
Upgrade to Orval 8.0.2
References
An example OpenAPI showing the issue:
openapi: 3.0.4
info:
title: Enum PoC
version: "1.0.0"
paths:
/ping:
get:
operationId: ping
responses:
"200":
description: ok
content:
application/json:
schema:
$ref: "#/components/schemas/EvilEnum"
components:
schemas:
EvilEnum:
type: string
enum:
- PWNED
x-enumDescriptions:
- "pwned */ require('child_process').execSync('id'); /*"
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@orval/core"
},
"ranges": [
{
"events": [
{
"introduced": "8.0.0-rc.0"
},
{
"fixed": "8.0.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@orval/core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "7.19.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-23947"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-21T01:01:13Z",
"nvd_published_at": "2026-01-20T01:15:57Z",
"severity": "CRITICAL"
},
"details": "### Impact\nArbitrary code execution in environments consuming generated clients\n\nThis issue is similar in nature to the recently-patched MCP vulnerability (CVE-2026-22785), but affects a different code path in @orval/core that was not addressed by that fix.\n\nThe vulnerability allows untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript code into generated clients via the x-enumDescriptions field, which is embedded without proper escaping in getEnumImplementation(). I have confirmed that the injection occurs during const enum generation and results in executable code within the generated schema files.\n\n### Patches\nUpgrade to Orval 8.0.2\n\n### References\nAn example OpenAPI showing the issue:\n\n```yaml\nopenapi: 3.0.4\ninfo:\n title: Enum PoC\n version: \"1.0.0\"\n\npaths:\n /ping:\n get:\n operationId: ping\n responses:\n \"200\":\n description: ok\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/EvilEnum\"\n\ncomponents:\n schemas:\n EvilEnum:\n type: string\n enum:\n - PWNED\n x-enumDescriptions:\n - \"pwned */ require(\u0027child_process\u0027).execSync(\u0027id\u0027); /*\"\n```",
"id": "GHSA-h526-wf6g-67jv",
"modified": "2026-01-21T17:08:30Z",
"published": "2026-01-21T01:01:13Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jv"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-23947"
},
{
"type": "WEB",
"url": "https://github.com/orval-labs/orval/commit/9e5d93533904936678ba93b5d20f6bca176a4e1e"
},
{
"type": "PACKAGE",
"url": "https://github.com/orval-labs/orval"
},
{
"type": "WEB",
"url": "https://github.com/orval-labs/orval/releases/tag/v7.19.0"
},
{
"type": "WEB",
"url": "https://github.com/orval-labs/orval/releases/tag/v8.0.2"
}
],
"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",
"type": "CVSS_V4"
}
],
"summary": "Orval has a code injection via unsanitized x-enum-descriptions in enum generation"
}
GHSA-H53W-2CQ3-CJ2P
Vulnerability from github – Published: 2024-11-18 15:33 – Updated: 2026-04-01 18:32Improper Neutralization of Special Elements Used in a Template Engine vulnerability in Saso Nikolov Event Tickets with Ticket Scanner allows Server Side Include (SSI) Injection.This issue affects Event Tickets with Ticket Scanner: from n/a through 2.3.11.
{
"affected": [],
"aliases": [
"CVE-2024-52427"
],
"database_specific": {
"cwe_ids": [
"CWE-1336",
"CWE-82",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-18T15:15:06Z",
"severity": "CRITICAL"
},
"details": "Improper Neutralization of Special Elements Used in a Template Engine vulnerability in Saso Nikolov Event Tickets with Ticket Scanner allows Server Side Include (SSI) Injection.This issue affects Event Tickets with Ticket Scanner: from n/a through 2.3.11.",
"id": "GHSA-h53w-2cq3-cj2p",
"modified": "2026-04-01T18:32:25Z",
"published": "2024-11-18T15:33:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-52427"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/event-tickets-with-ticket-scanner/vulnerability/wordpress-event-tickets-with-ticket-scanner-plugin-2-3-11-remote-code-execution-rce-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/event-tickets-with-ticket-scanner/wordpress-event-tickets-with-ticket-scanner-plugin-2-3-11-remote-code-execution-rce-vulnerability?_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-H555-XXQ9-223X
Vulnerability from github – Published: 2022-05-17 03:22 – Updated: 2025-04-12 12:34GetPermissions.asp in Cogent Real-Time Systems Cogent DataHub before 7.3.5 allows remote attackers to execute arbitrary commands via unspecified vectors.
{
"affected": [],
"aliases": [
"CVE-2014-3789"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-05-22T23:55:00Z",
"severity": "HIGH"
},
"details": "GetPermissions.asp in Cogent Real-Time Systems Cogent DataHub before 7.3.5 allows remote attackers to execute arbitrary commands via unspecified vectors.",
"id": "GHSA-h555-xxq9-223x",
"modified": "2025-04-12T12:34:03Z",
"published": "2022-05-17T03:22:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-3789"
},
{
"type": "WEB",
"url": "https://ics-cert.us-cert.gov/advisories/ICSA-15-246-01"
},
{
"type": "WEB",
"url": "http://cogentdatahub.com/ReleaseNotes.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/67486"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-14-136"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H57W-VH34-F8CW
Vulnerability from github – Published: 2024-01-16 03:30 – Updated: 2024-01-23 20:11An issue in mingSoft MCMS v.5.2.4 allows a a remote attacker to obtain sensitive information via a crafted script to the password parameter.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "net.mingsoft:ms-mcms"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.2.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-51282"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-01-23T20:11:06Z",
"nvd_published_at": "2024-01-16T02:15:28Z",
"severity": "HIGH"
},
"details": "An issue in mingSoft MCMS v.5.2.4 allows a a remote attacker to obtain sensitive information via a crafted script to the password parameter.",
"id": "GHSA-h57w-vh34-f8cw",
"modified": "2024-01-23T20:11:06Z",
"published": "2024-01-16T03:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-51282"
},
{
"type": "WEB",
"url": "https://gitee.com/mingSoft/MCMS/issues/I4Q4NV"
},
{
"type": "WEB",
"url": "https://github.com/tanalala/CVE/blob/main/Code.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Code injection in mingSoft MCMS"
}
GHSA-H5G5-5XCR-5WM9
Vulnerability from github – Published: 2022-05-17 01:07 – Updated: 2025-04-11 04:15The XMLParse procedure in SAP Sybase Adaptive Server Enterprise (ASE) 15.7 ESD 2 allows remote authenticated users to read arbitrary files via a SQL statement containing an XML document with an external entity declaration in conjunction with an entity reference, related to an XML External Entity (XXE) issue.
{
"affected": [],
"aliases": [
"CVE-2013-6025"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-10-19T10:36:00Z",
"severity": "MODERATE"
},
"details": "The XMLParse procedure in SAP Sybase Adaptive Server Enterprise (ASE) 15.7 ESD 2 allows remote authenticated users to read arbitrary files via a SQL statement containing an XML document with an external entity declaration in conjunction with an entity reference, related to an XML External Entity (XXE) issue.",
"id": "GHSA-h5g5-5xcr-5wm9",
"modified": "2025-04-11T04:15:18Z",
"published": "2022-05-17T01:07:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-6025"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/88105"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/38805"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/55377"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/303900"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/63193"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1029208"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H5H8-PC6H-JVVX
Vulnerability from github – Published: 2021-04-29 21:52 – Updated: 2022-08-11 00:19URLs for Mercurial repositories in the root composer.json and package source download URLs are not sanitized correctly. Specifically crafted URL values allow commands to be executed in the HgDriver if hg/Mercurial is installed on the system.
Impact
- The impact to Composer users directly is limited as the composer.json file is typically under their own control and source download URLs can only be supplied by third party Composer repositories they explicitly trust to download and execute source code from, e.g. Composer plugins.
- The main impact is to services passing user input to Composer, including Packagist.org and Private Packagist. This allowed users to trigger remote command injection. The vulnerability has been patched on Packagist.org and Private Packagist within 12h of receiving the initial vulnerability report and based on a review of logs, to the best of our knowledge, was not abused by anyone.
- Other services/tools using VcsRepository/VcsDriver or derivatives may also be vulnerable and should upgrade their composer/composer dependency immediately
Patches
1.10.22 and 2.0.13 include patches for this issue.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "composer/composer"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.10.22"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "composer/composer"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0-alpha1"
},
{
"fixed": "2.0.13"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-29472"
],
"database_specific": {
"cwe_ids": [
"CWE-88",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2021-04-27T20:33:49Z",
"nvd_published_at": "2021-04-27T21:15:00Z",
"severity": "HIGH"
},
"details": "URLs for Mercurial repositories in the root composer.json and package source download URLs are not sanitized correctly. Specifically crafted URL values allow commands to be executed in the HgDriver if hg/Mercurial is installed on the system.\n\n### Impact\n- The impact to Composer users directly is limited as the composer.json file is typically under their own control and source download URLs can only be supplied by third party Composer repositories they explicitly trust to download and execute source code from, e.g. Composer plugins.\n- The main impact is to services passing user input to Composer, including Packagist.org and Private Packagist. This allowed users to trigger remote command injection. The vulnerability has been patched on Packagist.org and Private Packagist within 12h of receiving the initial vulnerability report and based on a review of logs, to the best of our knowledge, was not abused by anyone.\n- Other services/tools using VcsRepository/VcsDriver or derivatives may also be vulnerable and should upgrade their composer/composer dependency immediately\n\n### Patches\n1.10.22 and 2.0.13 include patches for this issue.",
"id": "GHSA-h5h8-pc6h-jvvx",
"modified": "2022-08-11T00:19:18Z",
"published": "2021-04-29T21:52:04Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-29472"
},
{
"type": "WEB",
"url": "https://blog.sonarsource.com/php-supply-chain-attack-on-composer"
},
{
"type": "WEB",
"url": "https://getcomposer.org"
},
{
"type": "WEB",
"url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/composer/composer/CVE-2021-29472.yaml"
},
{
"type": "PACKAGE",
"url": "https://github.com/composer/composer"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2021/dsa-4907"
}
],
"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": "Composer\u0027s missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial"
}
GHSA-H5JV-54PC-FQCH
Vulnerability from github – Published: 2022-05-01 18:27 – Updated: 2022-05-01 18:27Unrestricted file upload vulnerability in the Restaurante (com_restaurante) component for Joomla! allows remote attackers to upload and execute arbitrary PHP code via an upload action specifying a filename with a double extension such as .php.jpg, which creates an accessible file under img_original/.
{
"affected": [],
"aliases": [
"CVE-2007-4817"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-11T19:17:00Z",
"severity": "HIGH"
},
"details": "Unrestricted file upload vulnerability in the Restaurante (com_restaurante) component for Joomla! allows remote attackers to upload and execute arbitrary PHP code via an upload action specifying a filename with a double extension such as .php.jpg, which creates an accessible file under img_original/.",
"id": "GHSA-h5jv-54pc-fqch",
"modified": "2022-05-01T18:27:37Z",
"published": "2022-05-01T18:27:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-4817"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36538"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4383"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/26756"
},
{
"type": "WEB",
"url": "http://www.attrition.org/pipermail/vim/2007-September/001779.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25612"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/3139"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H5P3-XPHH-6569
Vulnerability from github – Published: 2022-05-17 01:25 – Updated: 2022-05-17 01:25Google Chrome before 37.0.2062.94 does not properly handle the interaction of extensions, IPC, the sync API, and Google V8, which allows remote attackers to execute arbitrary code via unspecified vectors, a different vulnerability than CVE-2014-3177.
{
"affected": [],
"aliases": [
"CVE-2014-3176"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-08-27T01:55:00Z",
"severity": "HIGH"
},
"details": "Google Chrome before 37.0.2062.94 does not properly handle the interaction of extensions, IPC, the sync API, and Google V8, which allows remote attackers to execute arbitrary code via unspecified vectors, a different vulnerability than CVE-2014-3177.",
"id": "GHSA-h5p3-xphh-6569",
"modified": "2022-05-17T01:25:27Z",
"published": "2022-05-17T01:25:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-3176"
},
{
"type": "WEB",
"url": "https://crbug.com/386988"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/95476"
},
{
"type": "WEB",
"url": "http://googlechromereleases.blogspot.com/2014/08/stable-channel-update_26.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2014-09/msg00027.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/60268"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/61482"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-201408-16.xml"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2014/dsa-3039"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/69404"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1030767"
}
],
"schema_version": "1.4.0",
"severity": []
}
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.