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.
8301 vulnerabilities reference this CWE, most recent first.
GHSA-JCCX-M9V4-9HWH
Vulnerability from github – Published: 2025-03-20 12:32 – Updated: 2025-03-21 22:23A remote code execution vulnerability exists in the Calculate function of parisneo/lollms version 9.8. The vulnerability arises from the use of Python's eval() function to evaluate mathematical expressions within a Python sandbox that disables __builtins__ and only allows functions from the math module. This sandbox can be bypassed by loading the os module using the _frozen_importlib.BuiltinImporter class, allowing an attacker to execute arbitrary commands on the server. The issue is fixed in version 9.10.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "lollms"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "11.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-6982"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-03-21T22:23:35Z",
"nvd_published_at": "2025-03-20T10:15:34Z",
"severity": "HIGH"
},
"details": "A remote code execution vulnerability exists in the Calculate function of parisneo/lollms version 9.8. The vulnerability arises from the use of Python\u0027s `eval()` function to evaluate mathematical expressions within a Python sandbox that disables `__builtins__` and only allows functions from the `math` module. This sandbox can be bypassed by loading the `os` module using the `_frozen_importlib.BuiltinImporter` class, allowing an attacker to execute arbitrary commands on the server. The issue is fixed in version 9.10.",
"id": "GHSA-jccx-m9v4-9hwh",
"modified": "2025-03-21T22:23:35Z",
"published": "2025-03-20T12:32:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6982"
},
{
"type": "WEB",
"url": "https://github.com/parisneo/lollms/commit/30e7eaba2ccfb751a81e7cb29fdef2ae8ffa6832"
},
{
"type": "PACKAGE",
"url": "https://github.com/ParisNeo/lollms"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/4f8e73ac-aaaf-4d5c-a6dd-58215b5a7fea"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "LoLLMS Code Injection vulnerability"
}
GHSA-JCFM-5VRW-VG43
Vulnerability from github – Published: 2022-05-17 00:37 – Updated: 2022-05-17 00:37Static code injection vulnerability in Sanus|artificium (aka Sanusart) Free simple guestbook PHP script, when downloaded before 20081111, allows remote attackers to inject arbitrary PHP code into messages.txt via the message parameter to act.php, which is executed when guestbook/guestbook.php is accessed. NOTE: some of these details are obtained from third party information.
{
"affected": [],
"aliases": [
"CVE-2008-6934"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-08-11T21:00:00Z",
"severity": "HIGH"
},
"details": "Static code injection vulnerability in Sanus|artificium (aka Sanusart) Free simple guestbook PHP script, when downloaded before 20081111, allows remote attackers to inject arbitrary PHP code into messages.txt via the message parameter to act.php, which is executed when guestbook/guestbook.php is accessed. NOTE: some of these details are obtained from third party information.",
"id": "GHSA-jcfm-5vrw-vg43",
"modified": "2022-05-17T00:37:20Z",
"published": "2022-05-17T00:37:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6934"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/46526"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7079"
},
{
"type": "WEB",
"url": "http://osvdb.org/49703"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/32643"
},
{
"type": "WEB",
"url": "http://www.sanusart.com/news.php"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32240"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/3095"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JCM8-JGJM-3Q85
Vulnerability from github – Published: 2022-05-14 02:43 – Updated: 2022-05-14 02:43The extSetOwner function in the UfProxyBrowserCtrl ActiveX control (UfPBCtrl.dll) in Trend Micro Internet Security Pro 2010 allows remote attackers to execute arbitrary code via an invalid address that is dereferenced as a pointer.
{
"affected": [],
"aliases": [
"CVE-2010-3189"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-08-31T20:00:00Z",
"severity": "HIGH"
},
"details": "The extSetOwner function in the UfProxyBrowserCtrl ActiveX control (UfPBCtrl.dll) in Trend Micro Internet Security Pro 2010 allows remote attackers to execute arbitrary code via an invalid address that is dereferenced as a pointer.",
"id": "GHSA-jcm8-jgjm-3q85",
"modified": "2022-05-14T02:43:37Z",
"published": "2022-05-14T02:43:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-3189"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/61397"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7633"
},
{
"type": "WEB",
"url": "http://esupport.trendmicro.com/pages/Hot-Fix-UfPBCtrldll-is-vulnerable-to-remote-attackers.aspx"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/41140"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/513327/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1024364"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/2185"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-10-165"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JCRR-RR6W-8C83
Vulnerability from github – Published: 2023-12-22 12:31 – Updated: 2024-09-12 21:32An issue was discovered in free5GC version 3.3.0, allows remote attackers to execute arbitrary code and cause a denial of service (DoS) on AMF component via crafted NGAP message.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/free5gc/amf"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.2.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-49391"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-12-22T19:51:38Z",
"nvd_published_at": "2023-12-22T11:15:07Z",
"severity": "HIGH"
},
"details": "An issue was discovered in free5GC version 3.3.0, allows remote attackers to execute arbitrary code and cause a denial of service (DoS) on AMF component via crafted NGAP message.",
"id": "GHSA-jcrr-rr6w-8c83",
"modified": "2024-09-12T21:32:39Z",
"published": "2023-12-22T12:31:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-49391"
},
{
"type": "WEB",
"url": "https://github.com/free5gc/free5gc/issues/497"
},
{
"type": "WEB",
"url": "https://github.com/free5gc/amf/commit/6fc612c35997cf4e8be1e5c86ae2242f04b576a9"
},
{
"type": "PACKAGE",
"url": "https://github.com/free5gc/amf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "free5GC AMF denial of service vulnerability"
}
GHSA-JCW8-R9XM-32C6
Vulnerability from github – Published: 2018-07-18 18:28 – Updated: 2020-08-31 18:26Affected versions of dns-sync have an arbitrary command execution vulnerability in the resolve() method.
Recommendation
- Use an alternative dns resolver
- Do not allow untrusted input into
dns-sync.resolve()
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "dns-sync"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16100"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:43:08Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Affected versions of `dns-sync` have an arbitrary command execution vulnerability in the `resolve()` method. \n\n\n\n## Recommendation\n\n- Use an alternative dns resolver\n- Do not allow untrusted input into `dns-sync.resolve()`",
"id": "GHSA-jcw8-r9xm-32c6",
"modified": "2020-08-31T18:26:20Z",
"published": "2018-07-18T18:28:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16100"
},
{
"type": "WEB",
"url": "https://github.com/skoranga/node-dns-sync/issues/1"
},
{
"type": "WEB",
"url": "https://github.com/skoranga/node-dns-sync/issues/1)"
},
{
"type": "WEB",
"url": "https://github.com/skoranga/node-dns-sync/issues/5"
},
{
"type": "WEB",
"url": "https://github.com/skoranga/node-dns-sync/commit/d9abaae384b198db1095735ad9c1c73d7b890a0d"
},
{
"type": "WEB",
"url": "https://github.com/skoranga/node-dns-sync/commit/d9abaae384b198db1095735ad9c1c73d7b890a0d)))"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-jcw8-r9xm-32c6"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/153"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/523"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Command Injection in dns-sync"
}
GHSA-JF79-6XX8-WW93
Vulnerability from github – Published: 2022-05-13 01:43 – Updated: 2022-05-13 01:43IBM Emptoris Services Procurement 10.0.0.5 could allow a remote attacker to include arbitrary files. A remote attacker could send a specially-crafted URL to specify a malicious file from a remote system, which could allow the attacker to execute arbitrary code on the vulnerable Web server. IBM X-Force ID: 128105.
{
"affected": [],
"aliases": [
"CVE-2017-1440"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-08-30T21:29:00Z",
"severity": "HIGH"
},
"details": "IBM Emptoris Services Procurement 10.0.0.5 could allow a remote attacker to include arbitrary files. A remote attacker could send a specially-crafted URL to specify a malicious file from a remote system, which could allow the attacker to execute arbitrary code on the vulnerable Web server. IBM X-Force ID: 128105.",
"id": "GHSA-jf79-6xx8-ww93",
"modified": "2022-05-13T01:43:24Z",
"published": "2022-05-13T01:43:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-1440"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/128105"
},
{
"type": "WEB",
"url": "http://www-01.ibm.com/support/docview.wss?uid=swg22005550"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/99542"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-JF7X-WMP8-3G54
Vulnerability from github – Published: 2026-05-13 21:32 – Updated: 2026-07-13 15:31A code injection vulnerability in Palo Alto Networks Prisma® Browser on macOS fails to properly restrict access to its AppleScript interface allowing a locally authenticated non-admin user to leverage this exposed Apple Event handler to send unauthorized commands to the browser.
{
"affected": [],
"aliases": [
"CVE-2026-0236"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-13T19:16:57Z",
"severity": "HIGH"
},
"details": "A code injection vulnerability in Palo Alto Networks Prisma\u00ae Browser on macOS fails to properly restrict access to its AppleScript interface allowing a locally authenticated non-admin user to leverage this exposed Apple Event handler to send unauthorized commands to the browser.",
"id": "GHSA-jf7x-wmp8-3g54",
"modified": "2026-07-13T15:31:33Z",
"published": "2026-05-13T21:32:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-0236"
},
{
"type": "WEB",
"url": "https://security.paloaltonetworks.com/CVE-2026-0236"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:N/R:U/V:D/RE:M/U:Amber",
"type": "CVSS_V4"
}
]
}
GHSA-JF8C-36VW-98X4
Vulnerability from github – Published: 2024-05-15 20:59 – Updated: 2024-05-15 20:59In Drupal core, when sending email some variables were not being sanitized for shell arguments in DefaultMailSystem::mail(), which could lead to remote code execution.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "drupal/drupal"
},
"ranges": [
{
"events": [
{
"introduced": "7.0"
},
{
"fixed": "7.60"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "drupal/drupal"
},
"ranges": [
{
"events": [
{
"introduced": "8.0.0"
},
{
"fixed": "8.5.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "drupal/drupal"
},
"ranges": [
{
"events": [
{
"introduced": "8.6.0"
},
{
"fixed": "8.6.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-05-15T20:59:25Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "In Drupal core, when sending email some variables were not being sanitized for shell arguments in `DefaultMailSystem::mail()`, which could lead to remote code execution.",
"id": "GHSA-jf8c-36vw-98x4",
"modified": "2024-05-15T20:59:25Z",
"published": "2024-05-15T20:59:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/drupal/2018-10-17-4.yaml"
},
{
"type": "PACKAGE",
"url": "https://github.com/drupal/drupal"
},
{
"type": "WEB",
"url": "https://www.drupal.org/sa-core-2018-006"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Drupal core Remote Code Execution"
}
GHSA-JFJG-VC52-WQVF
Vulnerability from github – Published: 2026-03-26 07:32 – Updated: 2026-06-08 20:04Summary
The docker.system_packages field in bentofile.yaml accepts arbitrary strings that are interpolated directly into Dockerfile RUN commands without sanitization. Since system_packages is semantically a list of OS package names (data), users do not expect values to be interpreted as shell commands. A malicious bentofile.yaml achieves arbitrary command execution during bentoml containerize / docker build.
Affected Component
src/_bentoml_sdk/images.py:85-89—.format(packages=" ".join(packages))into shell commandsrc/bentoml/_internal/container/frontend/dockerfile/templates/base_debian.j2:13—{{ __options__system_packages | join(' ') }}src/bentoml/_internal/bento/build_config.py:174— No validation onsystem_packages- All distro install commands in
src/bentoml/_internal/container/frontend/dockerfile/__init__.py
Affected Versions
All versions supporting docker.system_packages in bentofile.yaml, confirmed on 1.4.36.
Steps to Reproduce
- Create a project directory with:
service.py:
import bentoml
@bentoml.service
class MyService:
@bentoml.api
def predict(self) -> str:
return "hello"
bentofile.yaml:
service: "service:MyService"
docker:
system_packages:
- "curl && id > /tmp/bentoml-pwned #"
- Run:
bentoml build
- Examine the generated Dockerfile at
~/bentoml/bentos/my_service/<tag>/env/docker/Dockerfile. Line 41 will contain:
RUN apt-get install -q -y -o Dpkg::Options::=--force-confdef curl && id > /tmp/bentoml-pwned #
- Running
bentoml containerize my_service:<tag>will executeid > /tmp/bentoml-pwnedas root during the Docker build.
Root Cause
The system_packages field values are treated as package names (data) by the user but are string-formatted directly into shell commands in the Dockerfile:
# images.py:85-89
self.commands.append(
CONTAINER_METADATA[self.distro]["install_command"].format(
packages=" ".join(packages) # No escaping
)
)
Where install_command is "apt-get install -q -y -o Dpkg::Options::=--force-confdef {packages}".
A bash_quote filter (wrapping shlex.quote) exists in the codebase and is registered in both Jinja2 environments, but it is only applied to environment variable values, never to system_packages.
Impact
- Malicious repositories: An attacker publishes an ML project with a crafted
bentofile.yaml. Anyone who clones and builds it gets arbitrary code execution duringdocker build. - CI/CD compromise: Automated pipelines running
bentoml containerizeon PRs that modifybentofile.yamlare vulnerable. - BentoCloud: If BentoCloud builds images from user-supplied
bentofile.yaml, this could achieve RCE on cloud infrastructure. - Supply chain: Shared bentos or model repos in the BentoML ecosystem can contain malicious configs.
Suggested Fix
Option 1: Input validation (recommended)
Add a regex validator to system_packages in build_config.py:
import re
VALID_PACKAGE_NAME = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9.+\-_:]*$')
def _validate_system_packages(instance, attribute, value):
if value is None:
return
for pkg in value:
if not VALID_PACKAGE_NAME.match(pkg):
raise BentoMLException(
f"Invalid system package name: {pkg!r}. "
"Package names may only contain alphanumeric characters, "
"dots, plus signs, hyphens, underscores, and colons."
)
system_packages: t.Optional[t.List[str]] = attr.field(
default=None, validator=_validate_system_packages
)
Option 2: Output escaping
Apply shlex.quote() to each package name before interpolation in images.py:system_packages() and apply the bash_quote Jinja2 filter in base_debian.j2.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.4.36"
},
"package": {
"ecosystem": "PyPI",
"name": "bentoml"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.4.37"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-33744"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-26T07:32:44Z",
"nvd_published_at": "2026-03-27T01:16:21Z",
"severity": "HIGH"
},
"details": "## Summary\n\nThe `docker.system_packages` field in `bentofile.yaml` accepts arbitrary strings that are interpolated directly into Dockerfile `RUN` commands without sanitization. Since `system_packages` is semantically a list of OS package names (data), users do not expect values to be interpreted as shell commands. A malicious `bentofile.yaml` achieves arbitrary command execution during `bentoml containerize` / `docker build`.\n\n## Affected Component\n\n- `src/_bentoml_sdk/images.py:85-89` \u2014 `.format(packages=\" \".join(packages))` into shell command\n- `src/bentoml/_internal/container/frontend/dockerfile/templates/base_debian.j2:13` \u2014 `{{ __options__system_packages | join(\u0027 \u0027) }}`\n- `src/bentoml/_internal/bento/build_config.py:174` \u2014 No validation on `system_packages`\n- All distro install commands in `src/bentoml/_internal/container/frontend/dockerfile/__init__.py`\n\n## Affected Versions\n\nAll versions supporting `docker.system_packages` in `bentofile.yaml`, confirmed on 1.4.36.\n\n## Steps to Reproduce\n\n1. Create a project directory with:\n\n**service.py:**\n```python\nimport bentoml\n\n@bentoml.service\nclass MyService:\n @bentoml.api\n def predict(self) -\u003e str:\n return \"hello\"\n```\n\n**bentofile.yaml:**\n```yaml\nservice: \"service:MyService\"\ndocker:\n system_packages:\n - \"curl \u0026\u0026 id \u003e /tmp/bentoml-pwned #\"\n```\n\n2. Run:\n```bash\nbentoml build\n```\n\n3. Examine the generated Dockerfile at `~/bentoml/bentos/my_service/\u003ctag\u003e/env/docker/Dockerfile`. Line 41 will contain:\n```dockerfile\nRUN apt-get install -q -y -o Dpkg::Options::=--force-confdef curl \u0026\u0026 id \u003e /tmp/bentoml-pwned #\n```\n\n4. Running `bentoml containerize my_service:\u003ctag\u003e` will execute `id \u003e /tmp/bentoml-pwned` as root during the Docker build.\n\n## Root Cause\n\nThe `system_packages` field values are treated as package names (data) by the user but are string-formatted directly into shell commands in the Dockerfile:\n\n```python\n# images.py:85-89\nself.commands.append(\n CONTAINER_METADATA[self.distro][\"install_command\"].format(\n packages=\" \".join(packages) # No escaping\n )\n)\n```\n\nWhere `install_command` is `\"apt-get install -q -y -o Dpkg::Options::=--force-confdef {packages}\"`.\n\nA `bash_quote` filter (wrapping `shlex.quote`) exists in the codebase and is registered in both Jinja2 environments, but it is only applied to environment variable values, never to `system_packages`.\n\n## Impact\n\n1. **Malicious repositories**: An attacker publishes an ML project with a crafted `bentofile.yaml`. Anyone who clones and builds it gets arbitrary code execution during `docker build`.\n2. **CI/CD compromise**: Automated pipelines running `bentoml containerize` on PRs that modify `bentofile.yaml` are vulnerable.\n3. **BentoCloud**: If BentoCloud builds images from user-supplied `bentofile.yaml`, this could achieve RCE on cloud infrastructure.\n4. **Supply chain**: Shared bentos or model repos in the BentoML ecosystem can contain malicious configs.\n\n## Suggested Fix\n\n### Option 1: Input validation (recommended)\n\nAdd a regex validator to `system_packages` in `build_config.py`:\n\n```python\nimport re\n\nVALID_PACKAGE_NAME = re.compile(r\u0027^[a-zA-Z0-9][a-zA-Z0-9.+\\-_:]*$\u0027)\n\ndef _validate_system_packages(instance, attribute, value):\n if value is None:\n return\n for pkg in value:\n if not VALID_PACKAGE_NAME.match(pkg):\n raise BentoMLException(\n f\"Invalid system package name: {pkg!r}. \"\n \"Package names may only contain alphanumeric characters, \"\n \"dots, plus signs, hyphens, underscores, and colons.\"\n )\n\nsystem_packages: t.Optional[t.List[str]] = attr.field(\n default=None, validator=_validate_system_packages\n)\n```\n\n### Option 2: Output escaping\n\nApply `shlex.quote()` to each package name before interpolation in `images.py:system_packages()` and apply the `bash_quote` Jinja2 filter in `base_debian.j2`.",
"id": "GHSA-jfjg-vc52-wqvf",
"modified": "2026-06-08T20:04:21Z",
"published": "2026-03-26T07:32:44Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/bentoml/BentoML/security/advisories/GHSA-jfjg-vc52-wqvf"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33744"
},
{
"type": "PACKAGE",
"url": "https://github.com/bentoml/BentoML"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/bentoml/PYSEC-2026-157.yaml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "BentoML has Dockerfile Command Injection via system_packages in bentofile.yaml"
}
GHSA-JFM5-2VQ4-W29H
Vulnerability from github – Published: 2022-05-17 00:36 – Updated: 2025-04-20 03:45functions_vbseo_hook.php in the VBSEO module for vBulletin allows remote authenticated users to execute arbitrary code via the HTTP Referer header to visitormessage.php.
{
"affected": [],
"aliases": [
"CVE-2014-9463"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-09-15T20:29:00Z",
"severity": "HIGH"
},
"details": "functions_vbseo_hook.php in the VBSEO module for vBulletin allows remote authenticated users to execute arbitrary code via the HTTP Referer header to visitormessage.php.",
"id": "GHSA-jfm5-2vq4-w29h",
"modified": "2025-04-20T03:45:24Z",
"published": "2022-05-17T00:36:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-9463"
},
{
"type": "WEB",
"url": "https://blog.sucuri.net/2015/01/serious-vulnerability-on-vbseo.html"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/36232"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
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.