{"id":"CVE-2026-54326","aliases":["CVE-2026-54326","GHSA-7v5m-pr3q-6453"],"related":[],"kind":"vulnerability","state":"published","title":"Pi: Potential XSS in HTML session exports via Markdown URL sanitization bypass","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"# Potential XSS in HTML session exports via Markdown URL handling\n\nPi 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.\n\n## Impact\n\nThe 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.\n\nIf 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.\n\n## Affected versions\n\n- Affected: `@mariozechner/pi-coding-agent >= 0.27.5, <= 0.73.1`\n- Affected: `@earendil-works/pi-coding-agent >= 0.74.0, < 0.78.1`\n- Patched: `@earendil-works/pi-coding-agent 0.78.1`\n\nThe 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.\n\n## Resolution\n\nVersion 0.78.1 sanitizes Markdown link and image URLs with an allow-list after stripping C0 control characters.\n\n## Recommendations\n\nUpgrade `@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.\n\n## Timeline\n\n- 2026-05-29: Report received through GitHub Security Advisories\n- 2026-06-02: Fix committed\n- 2026-06-04: Fixed version 0.78.1 released\n- 2026-06-08: Advisory prepared for publication\n\n## Credits\n\nReported by Paul Urian and Cosmin Alexa of CrowdStrike.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-06-16T23:43:15.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N","score":2.5,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N","score":2.5,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N","score":2.5,"rating":"LOW"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 0.74.0, < 0.78.1","status":"affected"}],"vendor":"earendil-works","product":"pi","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.27.5","status":"affected","lastAffected":"0.73.1"}],"ecosystem":"npm","package":"@mariozechner/pi-coding-agent","purl":"pkg:npm/%40mariozechner/pi-coding-agent","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.74.0","status":"affected","fixed":"0.78.1"}],"ecosystem":"npm","package":"@earendil-works/pi-coding-agent","purl":"pkg:npm/%40earendil-works/pi-coding-agent","source":"ghsa"}],"references":[{"url":"https://github.com/earendil-works/pi/security/advisories/GHSA-7v5m-pr3q-6453","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/earendil-works/pi/commit/6cb23f9b5d5b6d1747672f535b167d0d809ac010","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/earendil-works/pi/releases/tag/v0.78.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54326","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/earendil-works/pi","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-24T13:09:02.637Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54326","url":"https://www.cve.org/CVERecord?id=CVE-2026-54326","licence":"CVE Terms of Use","modified":"2026-06-24T13:09:14.395Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7v5m-pr3q-6453","url":"https://github.com/advisories/GHSA-7v5m-pr3q-6453","licence":"CC-BY-4.0","modified":"2026-07-20T21:30:33.172Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54326","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54326","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:25.530Z","epss":{"score":0.00132,"percentile":0.0299,"date":"2026-12-01T12:00:22.000Z"}}