# CVE-2026-113787: odf-kit: HTML injection leading to XSS in odtToHtml() via unescaped style attribute values

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.26% (percentile 11, 2026-11-28)
- **CWE:** CWE-79
- **Aliases:** GHSA-3cgg-c5pp-57h6
- **Published:** 2026-10-21T15:25:43.527Z
- **Modified:** 2026-11-04T16:30:03.658Z

## Who should check

- Projects that depend on npm package odf-kit (\>= 0.6.0, \< 0.14.2)
- Anyone running GitHubNewbie0 odf-kit \>= 0.6.0, \< 0.14.2

## Description

odf-kit allows users to generate, fill, read, and convert OpenDocument Format files (.odt, .ods) in TypeScript and JavaScript. Starting in version 0.6.0 and prior to version 0.14.2, he renderer has an \`escapeHtml()\` helper and applies it consistently to text content and to attribute values — \`href\`, \`src\`, \`alt\`, \`id\`, \`data-author\`, \`data-date\`, citation text all go through it. The inline CSS strings do not. In \`renderTextSpan\` (\`dist/odt/to-html/html-renderer.js:195\`), the value of e.g. \`fo:color\` is copied from the document into \`style.fontColor\` verbatim by the parser (\`extractSpanStyle\`, read/parser.js:348), then concatenated raw into the attribute. A \`"\` in the value terminates the attribute early. The same unescaped \`style="${...}"\` pattern appears at roughly ten other emission sites: paragraph and heading (\`paragraphStyleToCss\`), table cells and rows (\`cellStyleToCss\`, \`rowStyleToCss\`), \`\<col\>\`, and the image style attribute. The affected source attributes include \`fo:color\`, \`fo:background-color\`, \`fo:text-shadow\`, \`fo:letter-spacing\`, \`fo:font-family\` (via both direct and font-face resolution), \`fo:margin-\*\`, \`fo:padding-\*\`, \`fo:line-height\`, \`fo:border\*\`, and \`style:vertical-align\`. Version 0.14.2 contains a patch.

## Affected and fixed versions

- npm `odf-kit`: affected \>= 0.6.0, \< 0.14.2; fixed 0.14.2 (osv)
- GitHubNewbie0 odf-kit: \>= 0.6.0, \< 0.14.2 (cvelist)

## Mitigation

- Upgrade odf-kit to 0.14.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-113787. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-113787.md
Affected: odf-kit >= 0.6.0, < 0.14.2
Fixed in: 0.14.2

Steps:
1. Search this machine and project for odf-kit (npm), GitHubNewbie0 odf-kit: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-113787 being exploited?

There is no confirmed exploitation: CVE-2026-113787 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.26% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-113787?

Medium: CVSS 6.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-113787?

odf-kit \>= 0.6.0, \< 0.14.2.

### Is there a fix for CVE-2026-113787?

Yes. Fixed in 0.14.2. Upgrade odf-kit to 0.14.2 or later.

### How do I check if I'm affected by CVE-2026-113787?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/GitHubNewbie0/odf-kit/security/advisories/GHSA-3cgg-c5pp-57h6>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-113787>
- patch: <https://github.com/GitHubNewbie0/odf-kit/commit/fa3abc5a7a757f56c7212b2dbe99d1d2db995420>
- other: <https://github.com/GitHubNewbie0/odf-kit>
- other: <https://github.com/GitHubNewbie0/odf-kit/releases/tag/v0.14.2>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-113787>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-3cgg-c5pp-57h6> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-113787> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-113787>
