CVE-2026-77309: CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and…
CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal Vulnerability ID: CVE-2026-77309 CVSS Score: 8.8 Published: 2026-11-20 CVE-2026-77309 (GHSA-
CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal
Vulnerability ID: CVE-2026-77309
CVSS Score: 8.8
Published: 2026-11-20
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
TL;DR
An unauthenticated attacker with network access to NASA-AMMOS AIT-GUI (< 2.5.1) can write arbitrary Python code to static/fields_in.txt by triggering an early HTTP 400 abort on POST /tlm/query, and then execute that file via directory traversal in POST /script/run.
⚠️ Exploit Status: POC
Technical Details
- Vulnerability Type: Path Traversal (CWE-22) & Incomplete Cleanup (CWE-459) leading to RCE
- CVSS v3.1 Score: 8.8 High (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
- Affected Component: ait/gui/init.py (handle_tlm_query_post & handle_script_run_post)
- Affected Versions: NASA-AMMOS AIT-GUI >= 1.0.0, < 2.5.1
- Patched Version: 2.5.1 (Commit beb8fc0813eded89f985d3eb9a73535dd327726d)
- Authentication Required: None (Session cookie automatically issued via GET /)
- Exploit Maturity: Proof-of-Concept (PoC) publicly available
- CISA KEV Status: Not Listed
Affected Systems
- NASA-AMMOS AIT-GUI (PyPI package: ait-gui) >= 1.0.0, < 2.5.1
-
AIT-GUI (ait-gui): >= 1.0.0, < 2.5.1 (Fixed in:
2.5.1)
Code Analysis
Commit: beb8fc0
Restrict script execution paths and avoid static temp files
diff --git a/ait/gui/__init__.py b/ait/gui/__init__.py
index 50e8420..04f3e8b 100644
--- a/ait/gui/__init__.py
+++ b/ait/gui/__init__.py
@@ -13,6 +13,7 @@
import os
import struct
import sys
+import tempfile
import time
from typing import Dict
import urllib
@@ -927,55 +928,63 @@ def handle_tlm_latest():
@App.route("/tlm/query", method="POST")
def handle_tlm_query_post():
""""""
- _fields_file_path = os.path.join(HTMLRoot.static_dir, "fields_in.txt")
+ _fields_file_path = None
data_dir = bottle.request.forms.get("dataDir")
time_field = bottle.request.forms.get("timeField")
packet = bottle.request.forms.get("packet")
- fields = bottle.request.forms.get("fields").split(",")
+ fields_raw = bottle.request.forms.get("fields")
start_time = bottle.request.forms.get("startTime")
end_time = bottle.request.forms.get("endTime")
- if not (time_field and packet and fields and start_time):
+ if not (time_field and packet and fields_raw and start_time):
bottle.abort(400, "Malformed parameters")
- with open(_fields_file_path, "w") as fields_file:
- for f in fields:
- fields_file.write(f + "\n")
-
- pcaps = []
- for d, _dirs, files in os.walk(data_dir):
- for f in files:
- if f.endswith(".pcap"):
- pcaps.append(os.path.join(d, f))
+ try:
+ with tempfile.NamedTemporaryFile(
+ mode="w",
+ prefix="ait-gui-fields-",
+ suffix=".txt",
+ delete=False,
+ ) as fields_file:
+ _fields_file_path = fields_file.name
+ for f in fields_raw.split(","):
+ fields_file.write(f + "\n")
+
+ pcaps = []
+ for d, _dirs, files in os.walk(data_dir):
+ for f in files:
+ if f.endswith(".pcap"):
+ pcaps.append(os.path.join(d, f))
+
+ if len(pcaps) == 0:
+ msg = "Unable to locate PCAP files for query given data directory {}".format(
+ data_dir
+ )
+ log.error(msg)
+ bottle.abort(400, msg)
- if len(pcaps) == 0:
- msg = "Unable to locate PCAP files for query given data directory {}".format(
- data_dir
+ tlm_query_proc = gevent.subprocess.call(
+ [
+ "ait-tlm-csv",
+ "--time_field",
+ time_field,
+ "--fields",
+ _fields_file_path,
+ "--stime",
+ start_time,
+ "--etime",
+ end_time,
+ "--packet",
+ packet,
+ "--csv",
+ os.path.join(HTMLRoot.static_dir, "query_out.csv"),
+ ]
+ + ["{}".format(p) for p in pcaps]
)
- log.error(msg)
- bottle.abort(400, msg)
-
- tlm_query_proc = gevent.subprocess.call(
- [
- "ait-tlm-csv",
- "--time_field",
- time_field,
- "--fields",
- _fields_file_path,
- "--stime",
- start_time,
- "--etime",
- end_time,
- "--packet",
- packet,
- "--csv",
- os.path.join(HTMLRoot.static_dir, "query_out.csv"),
- ]
- + ["{}".format(p) for p in pcaps]
- )
-
- os.remove(_fields_file_path)
+ finally:
+ if _fields_file_path and os.path.exists(_fields_file_path):
+ os.remove(_fields_file_path)
return bottle.static_file(
"query_out.csv", root=HTMLRoot.static_dir, mimetype="application/octet-stream"
@@ -1128,12 +1137,18 @@ def handle_script_run_post():
if _RUNNING_SCRIPT is None:
with Sessions.current() as session:
script_name = bottle.request.forms.get("scriptPath")
- script_path = os.path.join(ScriptRoot, script_name)
+ if not script_name:
+ bottle.abort(400, "Script cannot be located")
+
+ safe_root = pathlib.Path(ScriptRoot).resolve()
+ script_path = (safe_root / pathlib.Path(script_name)).resolve()
- if not os.path.exists(script_path):
+ if not script_path.is_relative_to(safe_root):
+ bottle.abort(400, "Invalid script path")
+ if not script_path.exists():
bottle.abort(400, "Script cannot be located")
- _RUNNING_SCRIPT = gevent.spawn(bg_exec_script, script_path)
+ _RUNNING_SCRIPT = gevent.spawn(bg_exec_script, str(script_path))
else:
msg = (
"Attempted to execute script while another script is running. "
Exploit Details
- GitHub Advisory GHSA-jrjx-9jjw-747m: Official security advisory containing curl-based proof-of-concept steps demonstrating file write via /tlm/query and execution via /script/run.
- GitHub Advisory Attachment (PoC Script): Automated Python proof-of-concept exploit script attached to the advisory report.
Mitigation Strategies
- Upgrade NASA-AMMOS AIT-GUI to version 2.5.1 or later.
- Restrict network access to the AIT-GUI HTTP interface (default port 8080) using host-based firewalls or network segmentation.
- Place AIT-GUI behind an authenticating reverse proxy and filter requests containing directory traversal sequences in POST /script/run.
- Audit and clean up any residual static/fields_in.txt files on the filesystem.
Remediation Steps:
- Update the ait-gui package to version 2.5.1 via pip: pip install --upgrade 'ait-gui>=2.5.1'.
- Verify that ait/gui/init.py incorporates commit beb8fc0813eded89f985d3eb9a73535dd327726d.
- Delete any existing fields_in.txt file inside the AIT-GUI static directory.
- Restart the AIT-GUI daemon service to ensure the patched handlers are loaded in memory.
References
- GitHub Security Advisory GHSA-jrjx-9jjw-747m
- Fix Commit beb8fc0813eded89f985d3eb9a73535dd327726d
- NASA-AMMOS AIT-GUI 2.5.1 Release
- AIT-GUI 2.5.1 Changelog
- National Vulnerability Database (NVD) - CVE-2026-77309
- CVE.org Record - CVE-2026-77309
Read the full report for CVE-2026-77309 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.