Skip to main content

CVE-2026-77309: AIT-GUI Route Chain Enables Unauthenticated Python

Defensive teardown of CVE-2026-77309 in AIT-GUI versions 1.0.0 through 2.5.0, covering the /tlm/query to /script/run chain, mitigations, and patch verification.

AI SECURITY Security Advisory
CVE-2026-77309: AIT-GUI route chain allows unauthenticated Python execution | Threat Radar
CVE-2026-77309: AIT-GUI route chain allows unauthenticated Python execution | Threat Radar Source: radar.offseq.com
Field Note · The Short Version 3 min read

Upgrade AIT-GUI to 2.5.1 or apply path containment and session validation to block unauthenticated arbitrary Python execution via /tlm/query and /script/run.

Key Numbers & Verified Specs

5 metrics
Metric / Spec Verified Finding Source
Affected versions ait-gui >= 1.0.0, <= 2.5.0 github.com
Patched version 2.5.1 github.com
CVSS 3.1 base score 8.8 High (AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) radar.offseq.com
CWEs CWE-22 Improper Limitation of a Pathname to a Restricted Directory; CWE-459 Incomplete Cleanup advisories.gitlab.com
EPSS 30-day exploitation probability 1.0% radar.offseq.com
Jump to section (5) +

Threat Model & Attack Surface Matrix

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) affects AIT-GUI versions 1.0.0 through 2.5.0 and permits unauthenticated remote code execution on the server process. The vulnerability chains two HTTP routes: POST /tlm/query writes attacker-controlled fields into fields_in.txt under the static directory, and POST /script/run reads that file and executes it as Python. Because /script/run lacks the path containment check present on nearby /scripts/load/, an attacker can traverse outside the configured script directory and execute arbitrary code with daemon privileges. CVSS 3.1 scores this at 8.8 High with adjacent network access, low complexity, no privileges, and no user interaction.

Attack SurfaceBlast RadiusConcrete Control
POST /tlm/query fields parameterArbitrary file write to static directoryValidate and sanitize fields; write to isolated temp directory outside static root
POST /script/run scriptPath parameterArbitrary Python execution as server daemonEnforce realpath containment under ScriptRoot; require authenticated session
GET / session cookie issuanceUnauthenticated session establishmentRate-limit cookie issuance; bind sessions to trusted clients
Static temp file fields_in.txtIncomplete cleanup enables script injectionDelete temp files on all error paths; use non-executable temp directories
CVE-2026-77309: AIT-GUI route chain allows unauthenticated Python execution | Threat Radar
CVE-2026-77309: AIT-GUI route chain allows unauthenticated Python execution | Threat Radar

Why Naive Prompt Filters Fail

This defect is not a prompt injection problem in the LLM sense, so input filtering on natural-language prompts does not address it. The root cause is a server-side path traversal and incomplete cleanup chain. A WAF or prompt filter inspecting HTTP bodies cannot reliably distinguish a legitimate script path from a traversal payload when the application joins user input to ScriptRoot without canonicalization. Furthermore, the temporary file is written by /tlm/query before /script/run is ever called, so filtering the second request misses the initial write primitive. Defense must occur at the application layer, not at a content-filter layer.

Defense-in-Depth & Sandbox Isolation Architecture

Patch to AIT-GUI 2.5.1 immediately. Until patching is complete, place the service behind an authentication proxy that requires a valid session before any POST to /script/run. Enforce path containment by resolving scriptPath with realpath and verifying the result starts with the configured ScriptRoot. Never write user-controlled fields to files under the static directory; use a dedicated temporary directory with the no-execution mount option. Run the AIT-GUI daemon as an unprivileged user inside a container or sandbox with no network egress to internal metadata services. These controls reduce blast radius even if a future route-chain defect appears.

Runnable Guardrail Policy / Verification Code

Python37 lines
import os
from pathlib import Path
from flask import request, abort, session

SCRIPT_ROOT = Path("/opt/ait-gui/scripts").resolve()
TEMP_ROOT = Path("/var/tmp/ait-gui").resolve()

def safe_script_path(user_path: str) -> Path:
    candidate = (SCRIPT_ROOT / user_path).resolve()
    if SCRIPT_ROOT not in candidate.parents and candidate != SCRIPT_ROOT:
        abort(403, "script path escapes ScriptRoot")
    if not candidate.exists():
        abort(404, "script not found")
    return candidate

def require_auth() -> None:
    if not session.get("authenticated"):
        abort(401, "authentication required")

@app.route("/script/run", methods=["POST"])
def run_script():
    require_auth()
    script_path = safe_script_path(request.form.get("scriptPath", ""))
    # Execute only validated scripts under ScriptRoot
    ...

@app.route("/tlm/query", methods=["POST"])
def tlm_query():
    fields = request.form.get("fields", "")
    tmp_file = TEMP_ROOT / "fields_in.txt"
    tmp_file.parent.mkdir(parents=True, exist_ok=True)
    tmp_file.write_text(fields)
    try:
        # query logic
        pass
    finally:
        tmp_file.unlink(missing_ok=True)

Verify the patch by checking the installed package version:

Bash2 lines
pip show ait-gui | grep Version
# Expected: Version: 2.5.1

Confirm that /script/run rejects traversal paths and that /tlm/query no longer leaves fields_in.txt in the static directory after error responses.

Operational Tradeoffs & False-Positive Budget

Adding authentication to /script/run may break internal automation that calls the route without sessions. Update service accounts or issue short-lived tokens before enforcing auth. Path containment checks add minimal latency, typically under 1 millisecond per request on local filesystems. Writing to /var/tmp instead of the static directory changes file permissions and may require SELinux policy updates. Monitor 403 and 404 responses from /script/run to tune the false-positive budget; legitimate scripts moved outside ScriptRoot will break until paths are corrected.

When not to use this guidance: if you cannot upgrade to 2.5.1 and must run an affected version, isolate the host completely and do not expose it to untrusted networks. The mitigations above reduce risk but do not replace the vendor patch.

GitHub Advisory GHSA-jrjx-9jjw-747m GitLab Advisory Database CVE-2026-77309 Threat Radar CVE-2026-77309 Record

Reader Q&A

Frequently Asked Questions

Does CVE-2026-77309 require authentication to exploit?
No. The advisory states that unauthenticated callers can obtain a session cookie through GET / and then issue POST /script/run to execute arbitrary Python with daemon privileges.
Which AIT-GUI versions are affected by GHSA-jrjx-9jjw-747m?
All versions from 1.0.0 through 2.5.0 are affected; version 2.5.1 contains the fix.
What is the primary defensive control for this vulnerability?
Upgrade to AIT-GUI 2.5.1, enforce script path containment under ScriptRoot, validate sessions on /script/run, and avoid writing attacker-controlled content to static temp files.

Bibliography & Verification

Primary Sources & References

3 cited sources
  1. [01] github.com advisories / GHSA-jrjx-9jjw-747m
  2. [02] advisories.gitlab.com pypi / ait-gui / CVE-2026-77309
  3. [03] radar.offseq.com threat / ait-gui-route-chain-allows-unauthenticated-python-execution-in…

Human × Agent Co-Work

Hamdi Soudani · in collaboration with Pyvren

Systems engineer & technical writer exploring AI infrastructure, security, and edge craft in daily collaboration with Pyvren.

Hamdi Soudani × Pyvren

Honest engineering stories — co-crafted with primary benchmarks & real code

Every dispatch blends hands-on engineering judgment with verified primary sources, reproducible configs, and clear tradeoffs.