CVE-2026-105396: Heym AI Agent Human-in-the-Loop Review Capability Token Leak via Spoofable Origin Header
AGENTIC SECURITY SCORE & HUMAN-IN-THE-LOOP GUARDRAIL EVALUATION
Target:Heym AI Agent Orchestration โ HITL Review URL Generator (build_public_base_url) NVD and generic CVSS calculators rate CVE-2026-105396 at 5.3 (Medium), classifying it as an unauthenticated token disclosure requiring user interaction (UI:R). The Agentic Security Score (HASS) elevates this evaluation to 94 (CRITICAL). In autonomous multi-agent systems, Human-in-the-Loop (HITL) review checkpoints represent the final authoritative guardrail preventing autonomous LLM agents from executing irreversible, privileged actions (MITRE ATLAS AML.T0054 / OWASP LLM06 Excessive Agency). Leaking the cryptographic review capability token completely eliminates human oversight, enabling adversaries to forge supervisor approval decisions and command autonomous agents to execute arbitrary shell commands, database drops, or financial transactions with the reviewer's authenticated authority.
CVE-2026-105396: Heym AI Agent Human-in-the-Loop Review Capability Token Leak via Spoofable Origin HeaderVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in Heym AI HITL Review 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)
1. Technical Context & Affected Software Matrix
Section titled โ1. Technical Context & Affected Software MatrixโHeym is widely integrated into autonomous AI workflows (including LangChain, LlamaIndex, and custom Agentic API servers) to enforce human oversight over dangerous tool actions.
| Parameter | Technical Specification | Operational Details |
|---|---|---|
| CVE Identifier | CVE-2026-105396 | International vulnerability tracking identifier |
| Software Platform | Heym AI Agent Framework | Python-based Human-in-the-Loop (HITL) review framework |
| Vulnerable Component | heym/server/helpers.py (build_public_base_url) | Review URL builder & origin resolver |
| Vulnerability Class | CWE-346 / CWE-200 / CWE-862 | Origin Validation Error / Capability Token Disclosure |
| Attack Vector | Network (HTTP/HTTPS) | Remote unauthenticated HTTP request with spoofed Origin header |
| Remediation Release | Heym v0.0.112 | Replaces header reflection with strict server configuration allowlist |
[ Unauthenticated Attacker ] | POST /api/v1/workflow/trigger Header Origin: https://evil-review.attacker.com Payload: "Deploy infrastructure and clean temp tables" | v +------------------------------------------+ | Heym AI Agent Engine | | Agent generates execution plan | | Requires Human-in-the-Loop Approval | +------------------------------------------+ | [ build_public_base_url() ] Reflects untrusted Origin header! | v +------------------------------------------+ | Generated Review Link with Token | | https://evil-review.attacker.com/review | | ?token=eyJhbGciOi...[Capability Token] | +------------------------------------------+ | Sent via Email / Slack / Webhook v +------------------------------------------+ | Human Reviewer (DevOps) | | Clicks link to inspect agent request | +------------------------------------------+ | Token delivered to Attacker Web Server! v +------------------------------------------+ | Attacker Decision API Injection | | POST /api/v1/review/decision (Approved) | +------------------------------------------+ | v +------------------------------------------+ | Autonomous Agent Executes Hijacked | | Tool Actions with Full Privileges | +------------------------------------------+2. Root Cause Analysis & Vulnerable Code Anatomy
Section titled โ2. Root Cause Analysis & Vulnerable Code AnatomyโThe root cause of CVE-2026-105396 lies in the dynamic determination of the external application URL from unvalidated client request headers within heym/server/helpers.py:
# Vulnerable implementation in Heym < 0.0.112 (heym/server/helpers.py)def build_public_base_url(request) -> str: # FLUID VULNERABILITY: Blind trust in client-supplied headers if "origin" in request.headers: return request.headers["origin"].rstrip("/")
if "x-forwarded-host" in request.headers: proto = request.headers.get("x-forwarded-proto", "https") host = request.headers["x-forwarded-host"] return f"{proto}://{host}".rstrip("/")
return settings.PUBLIC_BASE_URL.rstrip("/")When an agentic pipeline halts at a human review node, Heym formats the review notification:
def generate_review_link(request, review_session) -> str: base_url = build_public_base_url(request) # The capability token grants complete decision authority return f"{base_url}/review/{review_session.id}?token={review_session.capability_token}"Because build_public_base_url returned request.headers["origin"] verbatim without cross-referencing an authorized domain list, the review link sent to the human operator directed their browser to the attackerโs web infrastructure.
In Heym v0.0.112, the implementation strips dynamic header inspection, binding URL construction strictly to static environment settings or an explicit host whitelist:
# Patched implementation in Heym v0.0.112def build_public_base_url(request) -> str: # Strict fallback to verified configuration configured_url = settings.PUBLIC_BASE_URL if not configured_url: raise ConfigurationError("PUBLIC_BASE_URL must be explicitly configured")
# Optional whitelist verification if multi-domain is required if hasattr(settings, "ALLOWED_HOSTS") and "x-forwarded-host" in request.headers: host = request.headers["x-forwarded-host"] if host in settings.ALLOWED_HOSTS: proto = request.headers.get("x-forwarded-proto", "https") return f"{proto}://{host}".rstrip("/")
return configured_url.rstrip("/")3. Attack Execution Flow & Agentic Hijacking Mechanics
Section titled โ3. Attack Execution Flow & Agentic Hijacking MechanicsโsequenceDiagram autonumber actor Attacker as Remote Adversary participant Heym as Heym Engine (:8000) participant Agent as Autonomous LLM Agent participant Reviewer as Human Reviewer (Slack/Email) participant Evil as Attacker Server (evil.com)
Attacker->>Heym: POST /workflow/run (Origin: https://evil.com) Note over Heym: Agent formulates action: rm -rf /prod/backups Heym->>Heym: Hit Human-in-the-Loop review gate Heym->>Reviewer: Dispatch notification: "Approval needed: https://evil.com/review?token=CAP_TOKEN_99" Reviewer->>Evil: Clicks review link in Slack (GET /review?token=CAP_TOKEN_99) Note over Evil: Attacker captures CAP_TOKEN_99 in access logs Evil->>Reviewer: Displays generic error: "Service temporarily unavailable" Attacker->>Heym: POST /api/v1/review/decision (Bearer CAP_TOKEN_99, decision: "APPROVE") Heym->>Agent: Approval confirmed by Human Supervisor Agent->>Agent: Executes irreversible destructive action with verified authorityThe HITL Dissolution Threat Model
Section titled โThe HITL Dissolution Threat ModelโThe severity of this attack stems from the unique trust relationship established in agentic architectures:
- Zero-trust bypass: Security teams rely on Human-in-the-Loop gates specifically so that unvetted agent prompts or external inputs cannot trigger critical operations without manual verification.
- Decision forgery: By possessing the capability bearer token, the attacker does not need to compromise the human operatorโs enterprise SSO credentials; the capability token itself confers single-use or session-wide approval authority.
- Agentic escalation: Once approved, the agent executes shell commands, Kubernetes deployments, or financial transfers under its own pre-configured service identity.
4. Forensic Investigation & Threat Hunting
Section titled โ4. Forensic Investigation & Threat HuntingโDetecting CVE-2026-105396 exploitation involves monitoring ingress HTTP traffic for mismatched Origin and Host headers, checking audit logs for rapid review approvals, and searching notification records for unauthorized external domains.
title: Heym HITL Review Origin Header Spoofingid: 5a29c118-4f12-4c89-a201-105396e99001status: experimentaldescription: Detects HTTP requests to Heym agentic workflow endpoints where the Origin or X-Forwarded-Host header diverges from internal organizational domains.references: - https://vulncheck.com/advisories/heym-before-0.0.112-hitl-review-token-leak-via-spoofable-origin-header - https://hermes-codex.vercel.app/cve/2026/cve-2026-105396/author: Hermes Codex Cyber Intelligencedate: 2026-10-06logsource: category: webserverdetection: selection_endpoint: cs-uri-stem|startswith: - '/api/v1/workflow' - '/workflow' - '/api/v1/review' selection_suspicious: cs-header-origin|contains: 'http' filter_internal: cs-header-origin|contains: - 'internal.domain.corp' - 'heym.corp.local' - 'localhost' condition: selection_endpoint and selection_suspicious and not filter_internalfalsepositives: - Legitimate new domain migrations where ALLOWED_HOSTS has not yet been synchronizedlevel: hightags: - attack.initial_access - attack.t1190 - atlas.aml.t0054// Detect anomalous external URLs in Heym notification dispatch logsAppEvents| where AppName in ("heym-agent", "heym-server", "ai-orchestrator")| where Message has "generate_review_link" or Message has "review notification dispatched"| extend ReviewUrl = extract(@"https?://[^/\s]+(/[^?\s]+)?\?token=([a-zA-Z0-9_\-\.]+)", 0, Message), TargetHost = extract(@"https?://([^/:\s]+)", 1, Message)| where not(TargetHost endswith ".corp.internal" or TargetHost == "localhost" or TargetHost == "127.0.0.1")| project TimeGenerated, AppName, TargetHost, ReviewUrl, Message| order by TimeGenerated desc#!/usr/bin/env python3"""Audit Heym log files for spoofed review link dispatches."""import reimport sys
ALLOWED_DOMAINS = {"heym.internal", "agents.corp.net", "localhost:8000"}DISPATCH_PATTERN = re.compile(r'review_url="https?://([^/:]+)(?::\d+)?/[^"]*token=([a-zA-Z0-9_\-]+)"')
def audit_log(file_path): print(f"[*] Auditing Heym audit log: {file_path}") alerts = 0 with open(file_path, "r", encoding="utf-8", errors="ignore") as f: for line_no, line in enumerate(f, 1): match = DISPATCH_PATTERN.search(line) if match: host, token = match.groups() if host not in ALLOWED_DOMAINS: print(f"[!] ALERT (line {line_no}): Review URL generated for untrusted domain '{host}'!") print(f" Token prefix: {token[:8]}...") alerts += 1 print(f"[*] Audit complete. Total anomalies detected: {alerts}")
if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: python3 audit_heym_tokens.py <path_to_heym.log>") sys.exit(1) audit_log(sys.argv[1])5. Remediation Strategy & Mitigation
Section titled โ5. Remediation Strategy & Mitigationโ-
Upgrade Heym to v0.0.112 or later: Update the Heym package in your Python environment or container Dockerfile:
Terminal window pip install --upgrade "heym>=0.0.112" -
Explicitly Set
PUBLIC_BASE_URL: Configure a static canonical base URL in your environment variables to disable automatic resolution:Terminal window export HEYM_PUBLIC_BASE_URL="https://heym.internal.company.com"export HEYM_ALLOWED_HOSTS="heym.internal.company.com" -
Enforce Reverse Proxy Header Sanitization: In your Nginx or Traefik ingress gateway, strip or overwrite incoming
X-Forwarded-HostandOriginheaders before forwarding traffic to the Heym service:location /api/v1/workflow {proxy_set_header X-Forwarded-Host $host;proxy_set_header Origin "";proxy_pass http://heym_upstream;}