# GHSA-x7m8-jrm8-hpvx: @eigenpal/docx-editor-react: CSS injection and print-time XSS via unescaped embedded font-family name

> Attackers can inject CSS or execute scripts via crafted font names in .docx files, leading to data exfiltration or code execution when users open or print documents.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 10 Sep 2026

## What is GHSA-x7m8-jrm8-hpvx?

GHSA-x7m8-jrm8-hpvx is a cross-site scripting vulnerability in @eigenpal/docx-editor-core, published on 10 Sep 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

## Summary
Embedded font-family names (`word/fontTable.xml`) were interpolated unescaped into an injected `@font-face` `<style>` and into the print window's `document.write()`. A crafted name injects page-wide CSS on open, and breaks out of `<style>`
  into executable HTML on Print.

## Impact
Opening a crafted `.docx` applies attacker-controlled CSS page-wide with zero clicks (overlay/phishing, attribute-selector exfiltration of input values, tracking beacons). Clicking Print escalates to script execution in the embedder's origin.

## Remediation
Upgrade to 1.8.3. Font names are CSS-escaped before interpolation (quotes, backslash, `< >`, and CSS newlines), and the print window is assembled with DOM APIs instead of `document.write`.

## Which versions are affected by GHSA-x7m8-jrm8-hpvx?

4 open source packages ship an affected version, including @eigenpal/docx-editor-core and @eigenpal/docx-editor-react.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@eigenpal/docx-editor-core` | npm | All versions | 1.8.3 |
| `@eigenpal/docx-editor-core` | npm | All versions | 1.8.3 |
| `@eigenpal/docx-editor-react` | npm | All versions | 1.8.3 |
| `@eigenpal/docx-editor-react` | npm | All versions | 1.8.3 |

## How do I fix GHSA-x7m8-jrm8-hpvx?

Upgrade @eigenpal/docx-editor-core to 1.8.3 or later.

## Is GHSA-x7m8-jrm8-hpvx being exploited?

There is no known exploitation of GHSA-x7m8-jrm8-hpvx in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-x7m8-jrm8-hpvx and fix it if it is affected.

What it is: GHSA-x7m8-jrm8-hpvx is a cross-site scripting vulnerability in @eigenpal/docx-editor-core, published on 10 Sep 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-x7m8-jrm8-hpvx in the wild and no public exploit code.

Affected packages and fixed versions:
- @eigenpal/docx-editor-core (npm): affected all versions; fixed in 1.8.3
- @eigenpal/docx-editor-core (npm): affected all versions; fixed in 1.8.3
- @eigenpal/docx-editor-react (npm): affected all versions; fixed in 1.8.3
- @eigenpal/docx-editor-react (npm): affected all versions; fixed in 1.8.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-x7m8-jrm8-hpvx/ (Markdown: https://insights.sbomify.com/GHSA-x7m8-jrm8-hpvx/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-x7m8-jrm8-hpvx

---
From sbomify Insights: https://insights.sbomify.com/GHSA-x7m8-jrm8-hpvx/
Summaries are generated and may contain mistakes; the official description above is the record.
