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.

8342 vulnerabilities reference this CWE, most recent first.

GHSA-CJ55-GC7M-WVCQ

Vulnerability from github – Published: 2024-08-26 00:30 – Updated: 2024-11-18 16:27
VLAI
Summary
req may send an unintended request when a malformed URL is provided
Details

The req library is a widely used HTTP library in Go. However, it does not handle malformed URLs effectively. As a result, after parsing a malformed URL, the library may send HTTP requests to unexpected destinations, potentially leading to security vulnerabilities or unintended behavior in applications relying on this library for handling HTTP requests.

Despite developers potentially utilizing the net/url library to parse malformed URLs and implement blocklists to prevent HTTP requests to listed URLs, inconsistencies exist between how the net/url and req libraries parse URLs. These discrepancies can lead to the failure of defensive strategies, resulting in potential security threats such as Server-Side Request Forgery (SSRF) and Remote Code Execution (RCE).

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/imroc/req/v3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.43.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/imroc/req"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.43.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/imroc/req/v2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.43.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-45258"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-20",
      "CWE-918",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-08-26T15:54:18Z",
    "nvd_published_at": "2024-08-25T22:15:05Z",
    "severity": "MODERATE"
  },
  "details": "The `req` library is a widely used HTTP library in Go. However, it does not handle malformed URLs effectively. As a result, after parsing a malformed URL, the library may send HTTP requests to unexpected destinations, potentially leading to security vulnerabilities or unintended behavior in applications relying on this library for handling HTTP requests.\n\nDespite developers potentially utilizing the `net/url` library to parse malformed URLs and implement blocklists to prevent HTTP requests to listed URLs, inconsistencies exist between how the `net/url` and `req` libraries parse URLs. These discrepancies can lead to the failure of defensive strategies, resulting in potential security threats such as Server-Side Request Forgery (SSRF) and Remote Code Execution (RCE).",
  "id": "GHSA-cj55-gc7m-wvcq",
  "modified": "2024-11-18T16:27:07Z",
  "published": "2024-08-26T00:30:54Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-45258"
    },
    {
      "type": "WEB",
      "url": "https://github.com/imroc/req/commit/04e3ece5b380ecad9da3551c449f1b8a9aa76d3d"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/imroc/req"
    },
    {
      "type": "WEB",
      "url": "https://github.com/imroc/req/compare/v3.43.3...v3.43.4"
    },
    {
      "type": "WEB",
      "url": "https://pkg.go.dev/vuln/GO-2024-3098"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "req may send an unintended request when a malformed URL is provided"
}

GHSA-CJ6M-MJP7-2565

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

PHP remote file inclusion vulnerability in adminbereich/designconfig.php in Fastpublish CMS 1.9999 allows remote attackers to execute arbitrary PHP code via a URL in the config[fsBase] parameter, a different vector than CVE-2006-2726.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-6325"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-20",
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-12-13T19:46:00Z",
    "severity": "MODERATE"
  },
  "details": "PHP remote file inclusion vulnerability in adminbereich/designconfig.php in Fastpublish CMS 1.9999 allows remote attackers to execute arbitrary PHP code via a URL in the config[fsBase] parameter, a different vector than CVE-2006-2726.",
  "id": "GHSA-cj6m-mjp7-2565",
  "modified": "2022-05-01T18:41:40Z",
  "published": "2022-05-01T18:41:40Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-6325"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/39013"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/4725"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/28054"
    },
    {
      "type": "WEB",
      "url": "http://www.osvdb.org/39153"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/26845"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2007/4206"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CJ6V-CRPC-F3X5

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

Unspecified vulnerability in Microsoft Excel 2000 through 2004 allows user-assisted attackers to execute arbitrary code via a .xls file with a crafted FNGROUPCOUNT value.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2006-1308"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2006-07-13T22:05:00Z",
    "severity": "HIGH"
  },
  "details": "Unspecified vulnerability in Microsoft Excel 2000 through 2004 allows user-assisted attackers to execute arbitrary code via a .xls file with a crafted FNGROUPCOUNT value.",
  "id": "GHSA-cj6v-crpc-f3x5",
  "modified": "2022-05-01T06:48:03Z",
  "published": "2022-05-01T06:48:03Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2006-1308"
    },
    {
      "type": "WEB",
      "url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2006/ms06-037"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/27464"
    },
    {
      "type": "WEB",
      "url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A243"
    },
    {
      "type": "WEB",
      "url": "http://lists.grok.org.uk/pipermail/full-disclosure/2006-July/047837.html"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1016472"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/18890"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/2755"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CJ7J-WC7C-92FH

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

Multiple PHP remote file inclusion vulnerabilities in SazCart 1.5.1, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the (1) _saz[settings][site_dir] parameter to layouts/default/header.saz.php and the (2) _saz[settings][site_url] parameter to admin/alayouts/default/pages/login.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-2224"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-05-14T18:20:00Z",
    "severity": "MODERATE"
  },
  "details": "Multiple PHP remote file inclusion vulnerabilities in SazCart 1.5.1, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the (1) _saz[settings][site_dir] parameter to layouts/default/header.saz.php and the (2) _saz[settings][site_url] parameter to admin/alayouts/default/pages/login.php.",
  "id": "GHSA-cj7j-wc7c-92fh",
  "modified": "2022-05-01T23:47:56Z",
  "published": "2022-05-01T23:47:56Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2224"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42289"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/5566"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/30148"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/29113"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CJ7V-W2C7-CP7C

Vulnerability from github – Published: 2025-03-14 18:30 – Updated: 2025-04-14 22:25
VLAI
Summary
nest allows a remote attacker to execute arbitrary code via the Content-Type header
Details

File Upload vulnerability in nestjs nest prior to v.11.0.16 allows a remote attacker to execute arbitrary code via the Content-Type header.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@nestjs/common"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "11.0.0-next.1"
            },
            {
              "fixed": "11.0.16"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@nestjs/common"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "10.4.16"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-29409"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-03-27T21:13:49Z",
    "nvd_published_at": "2025-03-14T18:15:27Z",
    "severity": "MODERATE"
  },
  "details": "File Upload vulnerability in nestjs nest prior to v.11.0.16 allows a remote attacker to execute arbitrary code via the Content-Type header.",
  "id": "GHSA-cj7v-w2c7-cp7c",
  "modified": "2025-04-14T22:25:17Z",
  "published": "2025-03-14T18:30:51Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-29409"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nestjs/nest/issues/13311#issuecomment-1993839495"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nestjs/nest/issues/14876"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nestjs/nest/issues/14876#issuecomment-2796888038"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nestjs/nest/pull/14881"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/aydinnyunus/801342361584d1491c67a820a714f53f"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nestjs/nest"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nestjs/nest/blob/83a48b2c7396985144b7a6cd5d3bee1abb7c5d81/packages/common/pipes/file/file-type.validator.ts#L19"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nestjs/nest/releases/tag/v10.4.16"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nestjs/nest/releases/tag/v11.0.16"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "nest allows a remote attacker to execute arbitrary code via the Content-Type header"
}

GHSA-CJ8C-64C6-4XR5

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

Multiple static code injection vulnerabilities in the saveFeed function in rss/feedcreator.class.php in Bitweaver 2.6 and earlier allow (1) remote authenticated users to inject arbitrary PHP code into files by placing PHP sequences into the account's "display name" setting and then invoking boards/boards_rss.php, and might allow (2) remote attackers to inject arbitrary PHP code into files via the HTTP Host header in a request to boards/boards_rss.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-1677"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-05-18T18:30:00Z",
    "severity": "MODERATE"
  },
  "details": "Multiple static code injection vulnerabilities in the saveFeed function in rss/feedcreator.class.php in Bitweaver 2.6 and earlier allow (1) remote authenticated users to inject arbitrary PHP code into files by placing PHP sequences into the account\u0027s \"display name\" setting and then invoking boards/boards_rss.php, and might allow (2) remote attackers to inject arbitrary PHP code into files via the HTTP Host header in a request to boards/boards_rss.php.",
  "id": "GHSA-cj8c-64c6-4xr5",
  "modified": "2022-05-02T03:27:26Z",
  "published": "2022-05-02T03:27:26Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-1677"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/50631"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/8659"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/35057"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/503435"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/34910"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CJ8W-V588-P8WX

Vulnerability from github – Published: 2023-08-29 00:32 – Updated: 2023-08-31 14:49
VLAI
Summary
pf4j vulnerable to remote code execution via expandIfZip method in the extract function
Details

An issue in pf4j pf4j v.3.9.0 and before allows a remote attacker to obtain sensitive information and execute arbitrary code via the expandIfZip method in the extract function.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.pf4j:pf4j"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "3.9.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-40828"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-08-29T17:40:51Z",
    "nvd_published_at": "2023-08-28T22:15:09Z",
    "severity": "HIGH"
  },
  "details": "An issue in pf4j pf4j v.3.9.0 and before allows a remote attacker to obtain sensitive information and execute arbitrary code via the expandIfZip method in the extract function.",
  "id": "GHSA-cj8w-v588-p8wx",
  "modified": "2023-08-31T14:49:19Z",
  "published": "2023-08-29T00:32:04Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-40828"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pf4j/pf4j/pull/537"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pf4j/pf4j/pull/538"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pf4j/pf4j/commit/8e0aa198c4e652cfc1eb9e05ca9b64397f67cc72"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/pf4j/pf4j"
    }
  ],
  "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": "pf4j vulnerable to remote code execution via expandIfZip method in the extract function"
}

GHSA-CJ9X-XC4V-VQ59

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

IonizeCMS v1.0.8.1 was discovered to contain a command injection vulnerability via the function copy_lang_content in application/models/lang_model.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-29307"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-05-12T16:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "IonizeCMS v1.0.8.1 was discovered to contain a command injection vulnerability via the function copy_lang_content in application/models/lang_model.php.",
  "id": "GHSA-cj9x-xc4v-vq59",
  "modified": "2022-05-22T00:00:35Z",
  "published": "2022-05-13T00:00:53Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29307"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ionize/ionize/issues/405"
    }
  ],
  "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-CJCG-P99F-62W9

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

GUI.pm in yarssr 0.2.2, when Gnome default URL handling is disabled, allows remote attackers to execute arbitrary commands via shell metacharacters in a link element in a feed.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-5837"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-11-05T19:46:00Z",
    "severity": "MODERATE"
  },
  "details": "GUI.pm in yarssr 0.2.2, when Gnome default URL handling is disabled, allows remote attackers to execute arbitrary commands via shell metacharacters in a link element in a feed.",
  "id": "GHSA-cjcg-p99f-62w9",
  "modified": "2022-05-01T18:37:10Z",
  "published": "2022-05-01T18:37:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5837"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38191"
    },
    {
      "type": "WEB",
      "url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448721"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/27454"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/28671"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2008/dsa-1477"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/26273"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2007/3679"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CJG9-JPJG-2P4R

Vulnerability from github – Published: 2022-05-02 06:19 – Updated: 2022-05-02 06:19
VLAI
Details

PostgreSQL 7.4 before 7.4.29, 8.0 before 8.0.25, 8.1 before 8.1.21, 8.2 before 8.2.17, 8.3 before 8.3.11, 8.4 before 8.4.4, and 9.0 Beta before 9.0 Beta 2 does not properly restrict PL/perl procedures, which allows remote authenticated users, with database-creation privileges, to execute arbitrary Perl code via a crafted script, related to the Safe module (aka Safe.pm) for Perl. NOTE: some sources report that this issue is the same as CVE-2010-1447.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2010-1169"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2010-05-19T18:30:00Z",
    "severity": "HIGH"
  },
  "details": "PostgreSQL 7.4 before 7.4.29, 8.0 before 8.0.25, 8.1 before 8.1.21, 8.2 before 8.2.17, 8.3 before 8.3.11, 8.4 before 8.4.4, and 9.0 Beta before 9.0 Beta 2 does not properly restrict PL/perl procedures, which allows remote authenticated users, with database-creation privileges, to execute arbitrary Perl code via a crafted script, related to the Safe module (aka Safe.pm) for Perl. NOTE: some sources report that this issue is the same as CVE-2010-1447.",
  "id": "GHSA-cjg9-jpjg-2p4r",
  "modified": "2022-05-02T06:19:43Z",
  "published": "2022-05-02T06:19:43Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2010-1169"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=582615"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=588269"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/58693"
    },
    {
      "type": "WEB",
      "url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10645"
    },
    {
      "type": "WEB",
      "url": "http://lists.fedoraproject.org/pipermail/package-announce/2010-May/041559.html"
    },
    {
      "type": "WEB",
      "url": "http://lists.fedoraproject.org/pipermail/package-announce/2010-May/041579.html"
    },
    {
      "type": "WEB",
      "url": "http://lists.fedoraproject.org/pipermail/package-announce/2010-May/041591.html"
    },
    {
      "type": "WEB",
      "url": "http://lists.opensuse.org/opensuse-security-announce/2010-08/msg00001.html"
    },
    {
      "type": "WEB",
      "url": "http://marc.info/?l=bugtraq\u0026m=134124585221119\u0026w=2"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/64755"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/39815"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/39820"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/39845"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/39898"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/39939"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2010/dsa-2051"
    },
    {
      "type": "WEB",
      "url": "http://www.mandriva.com/security/advisories?name=MDVSA-2010:103"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2010/05/20/5"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/about/news.1203"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/docs/current/static/release-7-4-29.html"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/docs/current/static/release-8-0-25.html"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/docs/current/static/release-8-1-21.html"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/docs/current/static/release-8-2-17.html"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/docs/current/static/release-8-3-11.html"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/docs/current/static/release-8-4-4.html"
    },
    {
      "type": "WEB",
      "url": "http://www.postgresql.org/support/security"
    },
    {
      "type": "WEB",
      "url": "http://www.redhat.com/support/errata/RHSA-2010-0427.html"
    },
    {
      "type": "WEB",
      "url": "http://www.redhat.com/support/errata/RHSA-2010-0428.html"
    },
    {
      "type": "WEB",
      "url": "http://www.redhat.com/support/errata/RHSA-2010-0429.html"
    },
    {
      "type": "WEB",
      "url": "http://www.redhat.com/support/errata/RHSA-2010-0430.html"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/40215"
    },
    {
      "type": "WEB",
      "url": "http://www.securitytracker.com/id?1023988"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2010/1167"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2010/1182"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2010/1197"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2010/1198"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2010/1207"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2010/1221"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

Mitigation
Architecture and Design

Strategy: Refactoring

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

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

Strategy: Input Validation

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

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

Mitigation MIT-32
Operation

Strategy: Compilation or Build Hardening

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

Mitigation MIT-32
Operation

Strategy: Environment Hardening

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

Mitigation
Implementation

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

CAPEC-242: Code Injection

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

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

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

CAPEC-77: Manipulating User-Controlled Variables

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