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.

8380 vulnerabilities reference this CWE, most recent first.

GHSA-6V4R-9CP8-CPGJ

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

Bitmessage PyBitmessage version v0.6.2 (and introduced in or after commit 8ce72d8d2d25973b7064b1cf76a6b0b3d62f0ba0) contains a Eval injection vulnerability in main program, file src/messagetypes/init.py function constructObject that can result in Code Execution. This attack appears to be exploitable via remote attacker using a malformed message which must be processed by the victim - e.g. arrive from any sender on bitmessage network. This vulnerability appears to have been fixed in v0.6.3.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2018-1000070"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-03-13T15:29:00Z",
    "severity": "HIGH"
  },
  "details": "Bitmessage PyBitmessage version v0.6.2 (and introduced in or after commit 8ce72d8d2d25973b7064b1cf76a6b0b3d62f0ba0) contains a Eval injection vulnerability in main program, file src/messagetypes/__init__.py function constructObject that can result in Code Execution. This attack appears to be exploitable via remote attacker using a malformed message which must be processed by the victim - e.g. arrive from any sender on bitmessage network. This vulnerability appears to have been fixed in v0.6.3.",
  "id": "GHSA-6v4r-9cp8-cpgj",
  "modified": "2022-05-13T01:18:44Z",
  "published": "2022-05-13T01:18:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1000070"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Bitmessage/PyBitmessage/commit/3a8016d31f517775d226aa8b902480f4a3a148a9#comments"
    }
  ],
  "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"
    }
  ]
}

GHSA-6V5G-5362-MJ6F

Vulnerability from github – Published: 2025-02-13 09:31 – Updated: 2025-02-13 09:31
VLAI
Details

The Avada | Website Builder For WordPress & WooCommerce theme for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 7.11.13. This is due to the software allowing users to execute an action that does not properly validate a value before running do_shortcode. This makes it possible for unauthenticated attackers to execute arbitrary shortcodes.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-13346"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-02-13T07:15:09Z",
    "severity": "HIGH"
  },
  "details": "The Avada | Website Builder For WordPress \u0026 WooCommerce theme for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 7.11.13. This is due to the software allowing users to execute an action that does not properly validate a value before running do_shortcode. This makes it possible for unauthenticated attackers to execute arbitrary shortcodes.",
  "id": "GHSA-6v5g-5362-mj6f",
  "modified": "2025-02-13T09:31:25Z",
  "published": "2025-02-13T09:31:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-13346"
    },
    {
      "type": "WEB",
      "url": "https://avada.com/documentation/avada-changelog"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/1f2f390b-332b-452c-9fe7-ccd1a45390dd?source=cve"
    }
  ],
  "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"
    }
  ]
}

GHSA-6V73-FGF6-W5J7

Vulnerability from github – Published: 2022-04-03 00:00 – Updated: 2025-10-22 19:18
VLAI
Summary
Spring Cloud Function Code Injection with a specially crafted SpEL as a routing expression
Details

In Spring Cloud Function versions 3.1.6, 3.2.2 and older unsupported versions, when using routing functionality it is possible for a user to provide a specially crafted SpEL as a routing-expression that may result in remote code execution and access to local resources.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.springframework.cloud:spring-cloud-function-context"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.2.0"
            },
            {
              "fixed": "3.2.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.springframework.cloud:spring-cloud-function-context"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.1.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2022-22963"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-917",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-04-05T18:48:10Z",
    "nvd_published_at": "2022-04-01T23:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "In Spring Cloud Function versions 3.1.6, 3.2.2 and older unsupported versions, when using routing functionality it is possible for a user to provide a specially crafted SpEL as a routing-expression that may result in remote code execution and access to local resources.",
  "id": "GHSA-6v73-fgf6-w5j7",
  "modified": "2025-10-22T19:18:02Z",
  "published": "2022-04-03T00:00:59Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-22963"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/spring-cloud/spring-cloud-function"
    },
    {
      "type": "WEB",
      "url": "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0005"
    },
    {
      "type": "WEB",
      "url": "https://tanzu.vmware.com/security/cve-2022-22963"
    },
    {
      "type": "WEB",
      "url": "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-java-spring-scf-rce-DQrHhJxH"
    },
    {
      "type": "WEB",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-22963"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpuapr2022.html"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpujul2022.html"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/173430/Spring-Cloud-3.2.2-Remote-Command-Execution.html"
    }
  ],
  "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/E:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Spring Cloud Function Code Injection with a specially crafted SpEL as a routing expression"
}

GHSA-6V92-R5MX-H5FX

Vulnerability from github – Published: 2025-07-27 09:30 – Updated: 2025-08-07 15:03
VLAI
Summary
smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module
Details

A sandbox escape vulnerability was identified in huggingface/smolagents version 1.14.0, allowing attackers to bypass the restricted execution environment and achieve remote code execution (RCE). The vulnerability stems from the local_python_executor.py module, which inadequately restricts Python code execution despite employing static and dynamic checks. Attackers can exploit whitelisted modules and functions to execute arbitrary code, compromising the host system. This flaw undermines the core security boundary intended to isolate untrusted code, posing risks such as unauthorized code execution, data leakage, and potential integration-level compromise. The issue is resolved in version 1.17.0.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "smolagents"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.17.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-5120"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-07-28T14:54:22Z",
    "nvd_published_at": "2025-07-27T08:15:25Z",
    "severity": "CRITICAL"
  },
  "details": "A sandbox escape vulnerability was identified in huggingface/smolagents version 1.14.0, allowing attackers to bypass the restricted execution environment and achieve remote code execution (RCE). The vulnerability stems from the local_python_executor.py module, which inadequately restricts Python code execution despite employing static and dynamic checks. Attackers can exploit whitelisted modules and functions to execute arbitrary code, compromising the host system. This flaw undermines the core security boundary intended to isolate untrusted code, posing risks such as unauthorized code execution, data leakage, and potential integration-level compromise. The issue is resolved in version 1.17.0.",
  "id": "GHSA-6v92-r5mx-h5fx",
  "modified": "2025-08-07T15:03:59Z",
  "published": "2025-07-27T09:30:26Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-5120"
    },
    {
      "type": "WEB",
      "url": "https://github.com/huggingface/smolagents/commit/33a942e62b6fbf6a35d41f1c735bda2d64c163d0"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/huggingface/smolagents"
    },
    {
      "type": "WEB",
      "url": "https://huntr.com/bounties/63ab1cfe-b573-4cf5-a7d3-fb6c957e34b0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module"
}

GHSA-6VJ2-4WV8-FM3G

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

Multiple eval injection vulnerabilities in phpScheduleIt before 1.2.11 allow remote attackers to execute arbitrary code via (1) the end_date parameter to reserve.php and (2) the start_date and end_date parameters to check.php. NOTE: the start_date/reserve.php vector is already covered by CVE-2008-6132.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-0820"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-03-05T02:30:00Z",
    "severity": "HIGH"
  },
  "details": "Multiple eval injection vulnerabilities in phpScheduleIt before 1.2.11 allow remote attackers to execute arbitrary code via (1) the end_date parameter to reserve.php and (2) the start_date and end_date parameters to check.php.  NOTE: the start_date/reserve.php vector is already covered by CVE-2008-6132.",
  "id": "GHSA-6vj2-4wv8-fm3g",
  "modified": "2022-05-02T03:18:37Z",
  "published": "2022-05-02T03:18:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0820"
    },
    {
      "type": "WEB",
      "url": "http://phpscheduleit.svn.sourceforge.net/viewvc/phpscheduleit/1.2.11/check.php?r1=318\u0026r2=332"
    },
    {
      "type": "WEB",
      "url": "http://phpscheduleit.svn.sourceforge.net/viewvc/phpscheduleit/1.2.11/reserve.php?r1=318\u0026r2=328"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/33991"
    },
    {
      "type": "WEB",
      "url": "http://sourceforge.net/project/shownotes.php?release_id=662749"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2009/0491"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6VR3-7WCX-V5G5

Vulnerability from github – Published: 2026-06-03 21:39 – Updated: 2026-06-03 21:39
VLAI
Summary
browserstack-runner vulnerable to Remote Code Execution via vm sandbox escape in _log HTTP handler
Details

Summary

The HTTP handler /_log in lib/server.js (lines 491–515) of browserstack-runner passes unauthenticated user-supplied data to vm.runInNewContext() combined with eval(), enabling a sandbox escape and arbitrary code execution on the host system.

Details

When browserstack-runner starts, it creates an HTTP server on port 8888 (configurable) that listens on all network interfaces (0.0.0.0). The /_log endpoint accepts POST requests and processes the JSON body as follows:

// lib/server.js lines 504-510
var context = { input: query.arguments, format: util.format, output: '' };
var tryEvalOrString = 'function (arg) { try { return eval(\'o = \' + arg); } catch (e) { return arg; } }';
vm.runInNewContext('output = format.apply(null, input.map(' + tryEvalOrString + '));', context);

The vm module is not a security mechanism per Node.js documentation. The context object contains a reference to util.format (a host-context Function), enabling sandbox escape via this.constructor.constructor("return process")().

Unlike the _progress and _report handlers which verify worker UUID authentication, the _log handler does not gate on authentication.

Proof of Concept

# Terminal 1: start the runner
echo '<html><body>t</body></html>' > t.html
echo '{"username":"X","key":"X","test_path":"t.html","test_framework":"qunit","browsers":[]}' > browserstack.json
node bin/runner.js

# Terminal 2: exploit
curl -s http://127.0.0.1:8888/_log \
  -H "Content-Type: application/json" \
  -d '{"arguments":["this.constructor.constructor(\"return process.mainModule.require(\`child_process\`).execSync(\`id\`).toString()\")()"]}'

# Terminal 1 output shows:
# [undefined] uid=1000(user) gid=1000(user) ...

Impact

An attacker on the same network as a developer running browserstack-runner can execute arbitrary commands on the developer's machine without authentication. The attack window exists for the duration of the test run (typically 1–15 minutes). The BrowserStack access key is accessible in the same process context via environment variables.

Remediation

  1. Remove eval() and vm.runInNewContext() from the _log handler — use JSON.stringify() for safe logging
  2. Add UUID authentication to _log (matching _progress and _report handlers)
  3. Bind the HTTP server on 127.0.0.1 instead of 0.0.0.0

Credit

Christ Bowel Bouchuen

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "browserstack-runner"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "0.9.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-49143"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-03T21:39:32Z",
    "nvd_published_at": "2026-06-02T21:16:28Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\nThe HTTP handler `/_log` in `lib/server.js` (lines 491\u2013515) of browserstack-runner passes unauthenticated user-supplied data to `vm.runInNewContext()` combined with `eval()`, enabling a sandbox escape and arbitrary code execution on the host system.\n\n### Details\n\nWhen `browserstack-runner` starts, it creates an HTTP server on port 8888 (configurable) that listens on all network interfaces (`0.0.0.0`). The `/_log` endpoint accepts POST requests and processes the JSON body as follows:\n\n```javascript\n// lib/server.js lines 504-510\nvar context = { input: query.arguments, format: util.format, output: \u0027\u0027 };\nvar tryEvalOrString = \u0027function (arg) { try { return eval(\\\u0027o = \\\u0027 + arg); } catch (e) { return arg; } }\u0027;\nvm.runInNewContext(\u0027output = format.apply(null, input.map(\u0027 + tryEvalOrString + \u0027));\u0027, context);\n```\n\nThe `vm` module is [not a security mechanism](https://nodejs.org/api/vm.html#vm-executing-javascript) per Node.js documentation. The `context` object contains a reference to `util.format` (a host-context Function), enabling sandbox escape via `this.constructor.constructor(\"return process\")()`.\n\nUnlike the `_progress` and `_report` handlers which verify worker UUID authentication, the `_log` handler does not gate on authentication.\n\n### Proof of Concept\n\n```bash\n# Terminal 1: start the runner\necho \u0027\u003chtml\u003e\u003cbody\u003et\u003c/body\u003e\u003c/html\u003e\u0027 \u003e t.html\necho \u0027{\"username\":\"X\",\"key\":\"X\",\"test_path\":\"t.html\",\"test_framework\":\"qunit\",\"browsers\":[]}\u0027 \u003e browserstack.json\nnode bin/runner.js\n\n# Terminal 2: exploit\ncurl -s http://127.0.0.1:8888/_log \\\n  -H \"Content-Type: application/json\" \\\n  -d \u0027{\"arguments\":[\"this.constructor.constructor(\\\"return process.mainModule.require(\\`child_process\\`).execSync(\\`id\\`).toString()\\\")()\"]}\u0027\n\n# Terminal 1 output shows:\n# [undefined] uid=1000(user) gid=1000(user) ...\n```\n\n### Impact\n\nAn attacker on the same network as a developer running `browserstack-runner` can execute arbitrary commands on the developer\u0027s machine without authentication. The attack window exists for the duration of the test run (typically 1\u201315 minutes). The BrowserStack access key is accessible in the same process context via environment variables.\n\n### Remediation\n\n1. Remove `eval()` and `vm.runInNewContext()` from the `_log` handler \u2014 use `JSON.stringify()` for safe logging\n2. Add UUID authentication to `_log` (matching `_progress` and `_report` handlers)\n3. Bind the HTTP server on `127.0.0.1` instead of `0.0.0.0`\n\n### Credit\n\nChrist Bowel Bouchuen",
  "id": "GHSA-6vr3-7wcx-v5g5",
  "modified": "2026-06-03T21:39:32Z",
  "published": "2026-06-03T21:39:32Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/browserstack/browserstack-runner/security/advisories/GHSA-6vr3-7wcx-v5g5"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-49143"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/browserstack/browserstack-runner"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/browserstack-runner-unauthenticated-rce-via-log-http-handler"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "browserstack-runner vulnerable to Remote Code Execution via vm sandbox escape in _log HTTP handler"
}

GHSA-6VRJ-8GXV-3R7W

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

Argument injection vulnerability in Request Tracker (RT) 3.8.x before 3.8.15 and 4.0.x before 4.0.8 allows remote attackers to create arbitrary files via unspecified vectors related to the GnuPG client.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2012-4884"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2012-11-11T13:00:00Z",
    "severity": "MODERATE"
  },
  "details": "Argument injection vulnerability in Request Tracker (RT) 3.8.x before 3.8.15 and 4.0.x before 4.0.8 allows remote attackers to create arbitrary files via unspecified vectors related to the GnuPG client.",
  "id": "GHSA-6vrj-8gxv-3r7w",
  "modified": "2022-05-17T05:18:46Z",
  "published": "2022-05-17T05:18:46Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2012-4884"
    },
    {
      "type": "WEB",
      "url": "http://lists.bestpractical.com/pipermail/rt-announce/2012-October/000212.html"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2012/dsa-2567"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6VRV-PVC8-F6CM

Vulnerability from github – Published: 2022-05-17 00:39 – Updated: 2022-05-17 00:39
VLAI
Details

security/xamppsecurity.php in XAMPP 1.6.8 performs an extract operation on the SERVER superglobal array, which allows remote attackers to spoof critical variables, as demonstrated by setting the REMOTE_ADDR variable to 127.0.0.1.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-6499"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-03-20T00:30:00Z",
    "severity": "MODERATE"
  },
  "details": "security/xamppsecurity.php in XAMPP 1.6.8 performs an extract operation on the SERVER superglobal array, which allows remote attackers to spoof critical variables, as demonstrated by setting the REMOTE_ADDR variable to 127.0.0.1.",
  "id": "GHSA-6vrv-pvc8-f6cm",
  "modified": "2022-05-17T00:39:19Z",
  "published": "2022-05-17T00:39:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6499"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/47202"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/7384"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6VX9-M878-J4X6

Vulnerability from github – Published: 2022-05-24 17:37 – Updated: 2022-05-24 17:37
VLAI
Details

JsLink in Webswing before 2.6.12 LTS, and 2.7.x and 20.x before 20.1, allows remote code execution.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-11103"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2020-12-30T21:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "JsLink in Webswing before 2.6.12 LTS, and 2.7.x and 20.x before 20.1, allows remote code execution.",
  "id": "GHSA-6vx9-m878-j4x6",
  "modified": "2022-05-24T17:37:36Z",
  "published": "2022-05-24T17:37:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-11103"
    },
    {
      "type": "WEB",
      "url": "https://bitbucket.org/meszarv/webswing/issues/375/webswing-jslink-mechanism-remote-code"
    },
    {
      "type": "WEB",
      "url": "https://www.webswing.org/docs/2.6/discover/release_notes.html#release-notes-2-6-12"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6W3P-6VXH-3M74

Vulnerability from github – Published: 2022-05-17 00:42 – Updated: 2022-05-17 00:42
VLAI
Details

PHP remote file inclusion vulnerability in assets/snippets/reflect/snippet.reflect.php in MODx CMS 0.9.6.2 and earlier, when magic_quotes_gpc is disabled, allows remote attackers to execute arbitrary PHP code via a URL in the reflect_base parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-5938"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-01-22T11:30:00Z",
    "severity": "MODERATE"
  },
  "details": "PHP remote file inclusion vulnerability in assets/snippets/reflect/snippet.reflect.php in MODx CMS 0.9.6.2 and earlier, when magic_quotes_gpc is disabled, allows remote attackers to execute arbitrary PHP code via a URL in the reflect_base parameter.",
  "id": "GHSA-6w3p-6vxh-3m74",
  "modified": "2022-05-17T00:42:05Z",
  "published": "2022-05-17T00:42:05Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-5938"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/46797"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/7204"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/32824"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/4940"
    },
    {
      "type": "WEB",
      "url": "http://svn.modxcms.com/svn/tattoo/tattoo/releases/0.9.6.3/install/changelog.txt"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/32436"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2008/3236"
    }
  ],
  "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.