CVE-2026-54326

CVE-2026-54326 is a low-severity cross-site scripting (XSS) vulnerability in @mariozechner/pi-coding-agent (npm), affecting versions >= 0.27.5, <= 0.73.1. It is fixed in 0.78.1.

Summary

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.

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.

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.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2026-54326 has a CVSS score of 2.5 (Low). The vector is requires local access, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.78.1); upgrading removes the vulnerable code path.

Affected versions

@mariozechner/pi-coding-agent (>= 0.27.5, <= 0.73.1) @earendil-works/pi-coding-agent (>= 0.74.0, < 0.78.1)

Security releases

@earendil-works/pi-coding-agent → 0.78.1 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

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

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-54326? CVE-2026-54326 is a low-severity cross-site scripting (XSS) vulnerability in @mariozechner/pi-coding-agent (npm), affecting versions >= 0.27.5, <= 0.73.1. It is fixed in 0.78.1. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2026-54326? CVE-2026-54326 has a CVSS score of 2.5 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-54326?
    • @mariozechner/pi-coding-agent (npm) (versions >= 0.27.5, <= 0.73.1)
    • @earendil-works/pi-coding-agent (npm) (versions >= 0.74.0, < 0.78.1)
  4. Is there a fix for CVE-2026-54326? Yes. CVE-2026-54326 is fixed in 0.78.1. Upgrade to this version or later.
  5. Is CVE-2026-54326 exploitable, and should I be worried? Whether CVE-2026-54326 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-54326 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-54326? Upgrade @earendil-works/pi-coding-agent to 0.78.1 or later.

Other vulnerabilities in @mariozechner/pi-coding-agent

CVE-2026-54328CVE-2026-54326

Stop the waste.
Protect your environment with Kodem.