2.5low
Pi: Potential XSS in HTML session exports via Markdown URL sanitization bypass
- Severity
- 2.5low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.13% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7v5m-pr3q-6453
Description
Pi is a minimal terminal coding harness. From 0.74.0 until 0.78.1, Pi HTML exports render session Markdown into a static HTML file. It did not consistently reject unsafe Markdown link and image URL schemes. In versions with scheme filtering, C0 control characters in the URL scheme could bypass the check because browsers normalize those characters before navigation. This vulnerability is fixed in 0.78.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| earendil-works pi | >= 0.74.0, < 0.78.1 | CVE List |
| @mariozechner/pi-coding-agent (npm) | from 0.27.5 up to 0.73.1 | GitHub Advisory Database |
| @earendil-works/pi-coding-agent (npm) | from 0.74.0 before 0.78.1 | GitHub Advisory Database |
All scores
| GitHub_M | 2.5low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
| GitHub | 2.5low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Pi is a minimal terminal coding harness. From 0.74.0 until 0.78.1, Pi HTML exports render session Markdown into a static HTML file. It did not consistently reject unsafe Markdown link and image URL schemes. In versions with scheme filtering, C0 control characters in the URL scheme could bypass the check because browsers normalize those characters before navigation. This vulnerability is fixed in 0.78.1.
GitHub Advisory Database
Potential XSS in HTML session exports via Markdown URL handling
Pi HTML exports render session Markdown into a static HTML file. Affected versions did not consistently reject unsafe Markdown link and image URL schemes. In versions with scheme filtering, C0 control characters in the URL scheme could bypass the check because browsers normalize those characters before navigation.
Impact
The realistic attack path is indirect. An attacker would need to get suitable Markdown into a session, for example through prompt injection that causes the model to include an unsafe link, or through other untrusted session content. The user would then need to export the session as HTML, open or share that file, and click the link.
If triggered, script runs in the exported document, not in pi or the user's shell. The main risk is limited disclosure of data embedded in that exported session file.
Affected versions
- Affected:
@mariozechner/pi-coding-agent >= 0.27.5, <= 0.73.1 - Affected:
@earendil-works/pi-coding-agent >= 0.74.0, < 0.78.1 - Patched:
@earendil-works/pi-coding-agent 0.78.1
The old @mariozechner/pi-coding-agent package scope has no patched release. It was renamed to @earendil-works/pi-coding-agent; users of the old scope should migrate to the new package and upgrade to version 0.78.1 or later.
Resolution
Version 0.78.1 sanitizes Markdown link and image URLs with an allow-list after stripping C0 control characters.
Recommendations
Upgrade @earendil-works/pi-coding-agent to version 0.78.1 or later. Regenerate shared HTML exports after upgrading if the underlying sessions contained untrusted content.
Timeline
- 2026-05-29: Report received through GitHub Security Advisories
- 2026-06-02: Fix committed
- 2026-06-04: Fixed version 0.78.1 released
- 2026-06-08: Advisory prepared for publication
Credits
Reported by Paul Urian and Cosmin Alexa of CrowdStrike.
NVD (es)
Pi es un arnés de codificación de terminal minimalista. Desde la versión 0.74.0 hasta la 0.78.1, las exportaciones HTML de Pi renderizan el Markdown de la sesión en un archivo HTML estático. No rechazaba consistentemente los esquemas de URL de enlaces e imágenes de Markdown inseguros. En versiones con filtrado de esquemas, los caracteres de control C0 en el esquema de URL podrían eludir la verificación porque los navegadores normalizan esos caracteres antes de la navegación. Esta vulnerabilidad está corregida en la versión 0.78.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-54326 changed 2026-06-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7v5m-pr3q-6453 changed 2026-07-20 | CC-BY-4.0 |
| NVD | CVE-2026-54326 changed 2026-10-25 | Public domain |