@mariozechner/pi-coding-agent
Affected
- introduced
0.27.5, last affected0.73.1(semver)
Fixed versions
None listed
Fix
No fixed version is listed.
Advisory
Also known as: CVE-2026-54326
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
@mariozechner/pi-coding-agent >= 0.27.5, <= 0.73.1@earendil-works/pi-coding-agent >= 0.74.0, < 0.78.1@earendil-works/pi-coding-agent 0.78.1The 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
Credits
Reported by Paul Urian and Cosmin Alexa of CrowdStrike.
Low Basis: The source's own band: LOW
0.27.5, last affected 0.73.1 (semver)None listed
No fixed version is listed.
0.74.0, fixed 0.78.1 (semver)0.78.1
0.78.1npm install @earendil-works/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0