Common Weakness Enumeration

CWE-94

Allowed-with-Review

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

Abstraction: Base · Status: Draft

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

8355 vulnerabilities reference this CWE, most recent first.

GHSA-23MC-XGFJ-48F2

Vulnerability from github – Published: 2023-01-14 03:30 – Updated: 2023-01-23 21:30
VLAI
Details

Tiki before 24.1, when feature_create_webhelp is enabled, allows lib/structures/structlib.php PHP Object Injection because of an eval.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-22853"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-01-14T01:15:00Z",
    "severity": "HIGH"
  },
  "details": "Tiki before 24.1, when feature_create_webhelp is enabled, allows lib/structures/structlib.php PHP Object Injection because of an eval.",
  "id": "GHSA-23mc-xgfj-48f2",
  "modified": "2023-01-23T21:30:25Z",
  "published": "2023-01-14T03:30:22Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-22853"
    },
    {
      "type": "WEB",
      "url": "https://karmainsecurity.com/KIS-2023-02"
    },
    {
      "type": "WEB",
      "url": "https://tiki.org/articles"
    }
  ],
  "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"
    }
  ]
}

GHSA-23P3-VCF6-94XQ

Vulnerability from github – Published: 2023-10-25 18:32 – Updated: 2023-11-01 18:30
VLAI
Details

An issue in SeaCMS v.12.9 allows an attacker to execute arbitrary commands via the admin_safe.php component.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-46010"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-10-25T18:17:35Z",
    "severity": "CRITICAL"
  },
  "details": "An issue in SeaCMS v.12.9 allows an attacker to execute arbitrary commands via the admin_safe.php component.",
  "id": "GHSA-23p3-vcf6-94xq",
  "modified": "2023-11-01T18:30:31Z",
  "published": "2023-10-25T18:32:23Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-46010"
    },
    {
      "type": "WEB",
      "url": "https://blog.csdn.net/DGS666/article/details/133795200?spm=1001.2014.3001.5501"
    },
    {
      "type": "WEB",
      "url": "http://seacms.com"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-23PM-573J-2RQJ

Vulnerability from github – Published: 2022-05-17 04:19 – Updated: 2022-05-17 04:19
VLAI
Details

CRLF injection vulnerability in the LightProcess protocol implementation in hphp/util/light-process.cpp in Facebook HipHop Virtual Machine (HHVM) before 2.4.2 allows remote attackers to execute arbitrary commands by entering a \n (newline) character before the end of a string.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2014-2208"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2014-12-28T15:59:00Z",
    "severity": "HIGH"
  },
  "details": "CRLF injection vulnerability in the LightProcess protocol implementation in hphp/util/light-process.cpp in Facebook HipHop Virtual Machine (HHVM) before 2.4.2 allows remote attackers to execute arbitrary commands by entering a \\n (newline) character before the end of a string.",
  "id": "GHSA-23pm-573j-2rqj",
  "modified": "2022-05-17T04:19:02Z",
  "published": "2022-05-17T04:19:02Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-2208"
    },
    {
      "type": "WEB",
      "url": "https://github.com/facebook/hhvm/commit/506a44194a9016406c752ad8e010c01aeffc18cc"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-23Q9-V5C2-XG7M

Vulnerability from github – Published: 2022-05-01 02:21 – Updated: 2022-05-01 02:21
VLAI
Details

PHP remote file inclusion vulnerability in content.php in phpGreetz 0.99 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the content parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2005-3861"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2005-11-29T11:03:00Z",
    "severity": "HIGH"
  },
  "details": "PHP remote file inclusion vulnerability in content.php in phpGreetz 0.99 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the content parameter.",
  "id": "GHSA-23q9-v5c2-xg7m",
  "modified": "2022-05-01T02:21:50Z",
  "published": "2022-05-01T02:21:50Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2005-3861"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/210"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1015276"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/417798/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/15575"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2005/2601"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-23R2-7V4M-M7MP

Vulnerability from github – Published: 2022-05-01 23:52 – Updated: 2022-05-01 23:52
VLAI
Details

Static code injection vulnerability in guestbook.php in 1Book 1.0.1 and earlier allows remote attackers to upload arbitrary PHP code via the message parameter in an HTML webform, which is written to data.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-2638"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-06-10T00:32:00Z",
    "severity": "HIGH"
  },
  "details": "Static code injection vulnerability in guestbook.php in 1Book 1.0.1 and earlier allows remote attackers to upload arbitrary PHP code via the message parameter in an HTML webform, which is written to data.php.",
  "id": "GHSA-23r2-7v4m-m7mp",
  "modified": "2022-05-01T23:52:03Z",
  "published": "2022-05-01T23:52:03Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2638"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42854"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/5736"
    },
    {
      "type": "WEB",
      "url": "http://1scripts.net/php-scripts/index.php?p=16"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/30146"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2008/1735/references"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-23V8-P364-5GVM

Vulnerability from github – Published: 2022-05-14 02:18 – Updated: 2022-05-14 02:18
VLAI
Details

The management interface in F5 BIG-IP 9.4.3 allows remote authenticated users with Resource Manager privileges to inject arbitrary Perl code via unspecified configuration settings related to Perl EP3 with templates, probably triggering static code injection.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-6474"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-03-16T16:30:00Z",
    "severity": "HIGH"
  },
  "details": "The management interface in F5 BIG-IP 9.4.3 allows remote authenticated users with Resource Manager privileges to inject arbitrary Perl code via unspecified configuration settings related to Perl EP3 with templates, probably triggering static code injection.",
  "id": "GHSA-23v8-p364-5gvm",
  "modified": "2022-05-14T02:18:22Z",
  "published": "2022-05-14T02:18:22Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6474"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/49308"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/51116"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/490496/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/28639"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-23W5-M3RW-WR6G

Vulnerability from github – Published: 2025-04-17 18:31 – Updated: 2026-04-01 18:34
VLAI
Details

Improper Control of Generation of Code ('Code Injection') vulnerability in termel PDF 2 Post allows Remote Code Inclusion. This issue affects PDF 2 Post: from n/a through 2.4.0.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-32583"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-04-17T16:15:44Z",
    "severity": "CRITICAL"
  },
  "details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in termel PDF 2 Post allows Remote Code Inclusion. This issue affects PDF 2 Post: from n/a through 2.4.0.",
  "id": "GHSA-23w5-m3rw-wr6g",
  "modified": "2026-04-01T18:34:49Z",
  "published": "2025-04-17T18:31:17Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-32583"
    },
    {
      "type": "WEB",
      "url": "https://patchstack.com/database/wordpress/plugin/pdf2post/vulnerability/wordpress-pdf-2-post-plugin-2-4-0-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-242M-GFV2-5GMP

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

Array index error in the virtio_load function in hw/virtio/virtio.c in QEMU before 1.7.2 allows remote attackers to execute arbitrary code via a crafted savevm image.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2013-6399"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2014-11-04T21:55:00Z",
    "severity": "HIGH"
  },
  "details": "Array index error in the virtio_load function in hw/virtio/virtio.c in QEMU before 1.7.2 allows remote attackers to execute arbitrary code via a crafted savevm image.",
  "id": "GHSA-242m-gfv2-5gmp",
  "modified": "2022-05-13T01:13:56Z",
  "published": "2022-05-13T01:13:56Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2013-6399"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2014:0674"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2014:0743"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2014:0744"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2014:0888"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2014:0927"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2014:1268"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/security/cve/CVE-2013-6399"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=1066361"
    },
    {
      "type": "WEB",
      "url": "http://git.qemu.org/?p=qemu.git%3Ba=commitdiff%3Bh=4b53c2c72cb5541cf394033b528a6fe2a86c0ac1"
    },
    {
      "type": "WEB",
      "url": "http://git.qemu.org/?p=qemu.git;a=commitdiff;h=4b53c2c72cb5541cf394033b528a6fe2a86c0ac1"
    },
    {
      "type": "WEB",
      "url": "http://lists.fedoraproject.org/pipermail/package-announce/2014-May/133345.html"
    },
    {
      "type": "WEB",
      "url": "http://lists.nongnu.org/archive/html/qemu-stable/2014-07/msg00187.html"
    },
    {
      "type": "WEB",
      "url": "http://rhn.redhat.com/errata/RHSA-2014-0743.html"
    },
    {
      "type": "WEB",
      "url": "http://rhn.redhat.com/errata/RHSA-2014-0744.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-2448-826C-4V5M

Vulnerability from github – Published: 2026-01-13 09:31 – Updated: 2026-02-05 09:31
VLAI
Details

An unauthenticated remote attacker can trick a high privileged user into uploading a malicious payload via the config-upload endpoint, leading to code injection as root. This results in a total loss of confidentiality, availability and integrity due to improper control of code generation ('Code Injection’).

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-41717"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-01-13T08:16:03Z",
    "severity": "HIGH"
  },
  "details": "An unauthenticated remote attacker can trick a high privileged user into uploading a malicious payload via the config-upload endpoint, leading to code injection as root. This results in a total loss of confidentiality, availability and integrity due to improper control of code generation (\u0027Code Injection\u2019).",
  "id": "GHSA-2448-826c-4v5m",
  "modified": "2026-02-05T09:31:12Z",
  "published": "2026-01-13T09:31:30Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-41717"
    },
    {
      "type": "WEB",
      "url": "https://certvde.com/de/advisories/VDE-2025-073"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2026/Feb/3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-2487-9F55-2VG9

Vulnerability from github – Published: 2025-05-12 19:58 – Updated: 2025-05-12 19:58
VLAI
Summary
OZI-Project/ozi-publish Code Injection vulnerability
Details

Impact

Potentially untrusted data flows into PR creation logic. A malicious actor could construct a branch name that injects arbitrary code.

Patches

This is patched in 1.13.6

Workarounds

Downgrade to <1.13.2

References

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "GitHub Actions",
        "name": "OZI-Project/publish"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.13.2"
            },
            {
              "fixed": "1.13.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-47271"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1116",
      "CWE-94",
      "CWE-95"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-05-12T19:58:07Z",
    "nvd_published_at": "2025-05-12T11:15:51Z",
    "severity": "MODERATE"
  },
  "details": "### Impact\nPotentially untrusted data flows into PR creation logic. A malicious actor could construct a branch name that injects arbitrary code.\n\n### Patches\nThis is patched in 1.13.6\n\n### Workarounds\nDowngrade to \u003c1.13.2\n\n### References\n\n* [Understanding the Risk of Script Injections](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections)",
  "id": "GHSA-2487-9f55-2vg9",
  "modified": "2025-05-12T19:58:07Z",
  "published": "2025-05-12T19:58:07Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/OZI-Project/publish/security/advisories/GHSA-2487-9f55-2vg9"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-47271"
    },
    {
      "type": "WEB",
      "url": "https://github.com/OZI-Project/publish/commit/abd8524ec69800890529846b3ccfb09ce7c10b5c"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/OZI-Project/publish"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OZI-Project/ozi-publish Code Injection vulnerability"
}

Mitigation
Architecture and Design

Strategy: Refactoring

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

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

Strategy: Input Validation

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

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

Mitigation MIT-32
Operation

Strategy: Compilation or Build Hardening

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

Mitigation MIT-32
Operation

Strategy: Environment Hardening

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

Mitigation
Implementation

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

CAPEC-242: Code Injection

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

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

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

CAPEC-77: Manipulating User-Controlled Variables

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