# CVE-2026-54326: earendil-works Pi XSS in HTML session exports

Source: https://junglewise.ai/threats/cve-2026-54326-earendil-works-pi-xss-in-html-session-exports  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-23. Updated: 2026-06-23  
License: CC BY 4.0 with a link back

CVE-2026-54326 · Severity: low · CVSS 3.1 · Published 2026-06-23

Pi, a terminal-based coding tool, is vulnerable to a security flaw when exporting coding sessions to HTML files. An attacker could potentially use malicious links to run unauthorized scripts if a user exports a session containing untrusted content and then opens that file in a web browser. This could lead to the limited exposure of data contained within that specific exported session file.

Technologies: [Earendil-Works Pi-Coding-Agent](https://junglewise.ai/threats/technologies/pi-coding-agent), [@earendil-works/pi-coding-agent (npm)](https://junglewise.ai/threats/technologies/earendil-works-pi-coding-agent), [@mariozechner/pi-coding-agent (npm)](https://junglewise.ai/threats/technologies/mariozechner-pi-coding-agent). Vendors: [Earendil-Works](https://junglewise.ai/threats/vendors/earendil-works), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-54326 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54326 being exploited in the wild.

**How severe is CVE-2026-54326?** Low severity, with a CVSS score of 3.1, published 23 June 2026.

**Which products and versions are affected?** Earendil-Works Pi-Coding-Agent >= 0.74.0, < 0.78.1; @earendil-works/pi-coding-agent (npm) >= 0.74.0, < 0.78.1, SEMVER:introduced=0.74.0,fixed=0.78.1; @mariozechner/pi-coding-agent (npm) >= 0.27.5, <= 0.73.1, SEMVER:introduced=0.27.5,last_affected=0.73.1.

**Is there a fix for CVE-2026-54326?** Yes. @earendil-works/pi-coding-agent (npm): upgrade to 0.78.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-54326 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-54326?** Check whether you run Earendil-Works Pi-Coding-Agent, @earendil-works/pi-coding-agent (npm) or @mariozechner/pi-coding-agent (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @earendil-works/pi-coding-agent (npm): upgrade to 0.78.1 or later

  ```sh
  npm install @earendil-works/pi-coding-agent@0.78.1
  ```


## Technical details

A stored Cross-Site Scripting (XSS) vulnerability exists in the HTML export functionality of the Pi coding harness. The root cause is improper neutralization of Markdown link and image URL schemes; specifically, C0 control characters could be used to bypass scheme filters because browsers normalize these characters before navigation. An exploit requires an attacker to inject malicious Markdown into a session (e.g., via prompt injection), followed by the user exporting the session to HTML and interacting with the malicious link. This results in script execution within the context of the static HTML document, potentially disclosing data embedded in that session file. The issue is fixed in version 0.78.1 by implementing an allow-list for schemes and stripping control characters.

## Affected products

- earendil-works pi-coding-agent >= 0.74.0, < 0.78.1
- mariozechner pi-coding-agent >= 0.27.5, <= 0.73.1

## Identifiers

- CVE-2026-54326
- GHSA-7v5m-pr3q-6453

## Timeline

- 2026-05-29: disclosed: Report received through GitHub Security Advisories
- 2026-06-02: patched: Fix committed to repository
- 2026-06-04: other: Fixed version 0.78.1 released
- 2026-06-23: advisory: CVE published to NVD

## References

- [https://github.com/earendil-works/pi/commit/6cb23f9b5d5b6d1747672f535b167d0d809ac010](https://github.com/earendil-works/pi/commit/6cb23f9b5d5b6d1747672f535b167d0d809ac010)
- [https://github.com/earendil-works/pi/releases/tag/v0.78.1](https://github.com/earendil-works/pi/releases/tag/v0.78.1)
- [https://github.com/earendil-works/pi/security/advisories/GHSA-7v5m-pr3q-6453](https://github.com/earendil-works/pi/security/advisories/GHSA-7v5m-pr3q-6453)

## Related threats

- [earendil-works Pi code execution via predictable temporary paths](https://junglewise.ai/threats/cve-2026-54328-earendil-works-pi-code-execution-via-predictable-temporary-paths)
- [Earendil Pi race condition in auth.json credential storage](https://junglewise.ai/threats/cve-2026-54327-earendil-pi-race-condition-in-auth-json-credential-storage)
- [earendil-works Pi arbitrary code execution via untrusted project extensions](https://junglewise.ai/threats/cve-2026-54325-earendil-works-pi-arbitrary-code-execution-via-untrusted-project)
