CVE-2026-54326 Pi: Potential XSS in HTML session exports via Markdown URL sanitization bypass

Low 2.5 Published Updated

Attackers can execute arbitrary scripts in victims' browsers by exploiting a Markdown URL sanitization bypass in Pi's HTML session exports.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-54326?

CVE-2026-54326 is a low-severity cross-site scripting vulnerability in earendil-works pi, published on 23 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-79

Which versions are affected by CVE-2026-54326?

4 open source packages ship an affected version, including @earendil-works/pi-coding-agent and @mariozechner/pi-coding-agent.

PackageAffectedFixed in
@earendil-works/pi-coding-agent npmFrom 0.74.00.78.1
@earendil-works/pi-coding-agent npmFrom 0.74.00.78.1
@mariozechner/pi-coding-agent npmFrom 0.27.5 to 0.73.1None
@mariozechner/pi-coding-agent npmFrom 0.27.5 to 0.73.1None

How do I fix CVE-2026-54326?

Upgrade @earendil-works/pi-coding-agent to 0.78.1 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-54326 being exploited?

There is no known exploitation of CVE-2026-54326 in the wild and no public exploit code.

Sources

Also known as GHSA-7v5m-pr3q-6453, MINI-gc3h-mgpf-54f6.

Is CVE-2026-54326 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free