Pi Agent: Potential XSS in HTML session exports via Markdown URL sanitization bypass
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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | @earendil-works/pi-coding-agent | >= 0.74.0, < 0.78.1 | 0.78.1 |
| Paquete de npm | @mariozechner/pi-coding-agent | >= 0.27.5, <= 0.73.1 | sin corrección |
Referencias
- https://github.com/earendil-works/pi/security/advisories/GHSA-7v5m-pr3q-6453
- https://nvd.nist.gov/vuln/detail/CVE-2026-54326
- https://github.com/earendil-works/pi/commit/6cb23f9b5d5b6d1747672f535b167d0d809ac010
- https://github.com/earendil-works/pi
- https://github.com/earendil-works/pi/releases/tag/v0.78.1
- Vector CVSS
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N- Debilidad (CWE)
CWE-79- Plataforma
- npm
- Paquete
@earendil-works/pi-coding-agent, @mariozechner/pi-coding-agent- Publicada
- 16.06.2026
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-7v5m-pr3q-6453 - CC BY 4.0
Historial de vulnerabilidades: @mariozechner/pi-coding-agent
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 3
- Primera → última
- 06.2026 06.2026
- Sin corrección
- 3
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 1
- Baja 2
Divulgaciones por año
- 2026: 3
-
Pi Agent: Potential XSS in HTML session exports via Markdown URL sanitization bypass esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.